Skip to content
This repository has been archived by the owner on May 28, 2019. It is now read-only.

bestiejs/maddy

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

34 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Maddy

Note:
Maddy is no longer under active development. For an alternative utility library, please check out Lo-Dash.

Maddy is a functional object operations library. It provides various higher-order functions for manipulating object members, as well as utility methods for determining deep equality, checking object types, and recursively inspecting objects. All recursive methods fully support cyclic structures.

Maddy is directly inspired by Functional, Underscore, and Ruby's Enumerable module, and philosophically by the FuseJS project.

The library is framework-agnostic, and is compatible with web browsers, CommonJS environments, JavaScript engines, and asynchronous script loaders. It also normalizes infamous bugs present in older environments, such as Internet Explorer 6 and Safari 2.

Downloads

The development version is commented and uncompressed; the production version has been compressed using Closure Compiler with advanced optimizations enabled.

If you're a Node user, Maddy is available on npm:

$ npm install maddy

The annotated source code is available for your perusal.

Compatibility

Maddy has been tested with the following web browsers, CommonJS environments, and JavaScript engines.

Web Browsers

CommonJS Environments

  • Node 0.2.6 and higher
  • Narwhal 0.3.2 and higher
  • RingoJS 0.4 and higher

JavaScript Engines

Contributing to Maddy

Check out a working copy of the Maddy source code with Git:

$ git clone git://github.com/kitcambridge/maddy.git

If you'd like to contribute a feature or bug fix, you can fork Maddy, commit your changes, and send a pull request. Please make sure to update the unit tests in the tests directory as well.

Alternatively, you can use the GitHub issue tracker to submit bug reports and feature requests.

Unit Tests

Maddy uses the Spec unit testing framework. The unit tests are written in Coco, a self-hosting CoffeeScript dialect that compiles to JavaScript. Coco reduces the syntactic noise and idiomatic verbosity inherent in writing unit tests for a functional programming library.

Coco can be installed via npm or Git. Once you've installed the compiler, run coco -wc tests/tests.co from the command line to watch and automatically recompile the unit tests as you modify them.

Coding Guidelines

In addition to the following Prototype-inspired guidelines, please follow the conventions already established in the code.

  • Spacing: Use two spaces for indentation. No tabs.
  • Naming: Keep variable and method names concise but descriptive. index and callback are preferable to i and fn.
  • Functions: Use named function declarations to aid in debugging. Avoid anonymous functions and named function expressions.
  • Comments: Significant changes and new methods should be annotated with comments.
  • Lint: Make sure that your changes pass JavaScript Lint. A configuration file is included in the repository; to check the source code for problems, run jsl -conf jsl.conf.

MIT License

Copyright © 2011-2012 Kit Cambridge.

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.