Fork me on GitHub

MOUT is a collection of modular JavaScript utilities that can be used in the browser as AMD modules or on node.js. - modules are converted into node.js format during npm publish using nodefy - It provides many helper methods similar to those found on other languages standard libraries (ie. Python, Ruby, PHP)

The biggest difference between other existing solutions is that you can choose to load only the modules/functions that you need, no extra overhead or complex build systems required. It also provides a clean and consistent API and normalizes the behavior across multiple browsers/environments. All batteries included.

More about MOUT history and philosophy.

Example

Each method is a separate module, so you can require only the methods that you need or a whole package:

// you can load individual methods (recommended)
var map = require('mout/array/map');
map([1, 2], function(val){ return val * val; }); // [1, 4]

// a single package
var stringUtils = require('mout/string');
stringUtils.camelCase('Foo Bar'); // "fooBar"

// or the whole lib
var mout = require('mout');
console.log( mout.math.clamp(17, 0, 10) ); // 10

API Documentation

FAQ / Wiki / IRC

For info about how to become a contributor, project decisions, migration tips, use the wiki as a reference.

We also have an IRC channel #moutjs at irc.freenode.net

Download

mout is available as a node.js module

npm install mout

or as AMD modules to be used on browsers.

bower install mout

you can also download the source files directly from github and/or clone the git repository:

git clone https://github.com/mout/mout.git

Author / Contributors

This project was formerly known as amd-utils (original work done by Miller Medeiros) and have multiple contributors.

It borrows features and is inspired by multiple open source projects like the PHP, python and Ruby standard libraries, underscore.js, lodash, prototype.js and many others but some similarities are just pure coincidence.

License

Released under the MIT license.