General toolkit for JavaScript. General like Orange Juice.
Contains support for only the following methods:
_.each([1, 2, 3], function (value, key) { ... });
console.log(_.escapeRegExp('My [string]')); // 'My \[string\]'
_.extend({}, defaults, {
open: function () { ... }
});
_.filter([1, 2, 3], function (value) {
return value >= 2;
});
###.forOwn(...)
_.forOwn({a: 1, b: 2}, function (value, key) { ... });
console.log(_.isArray([1, 2, 3)); // true
console.log(_.isArray({length: 2}); // false
console.log(_.isBoolean(false)); // true
console.log(_.isBoolean(21)); // false
console.log(_.isFunction(function () {})); // true
console.log(_.isFunction(21)); // false
console.log(_.isNumber(123)); // true
console.log(_.isNumber('hi')); // false
console.log(_.isPlainObject({a: 1})); // true
console.log(_.isPlainObject([1, 2])); // false
console.log(_.isString('my string')); // true
console.log(_.isString(321)); // false
_.map([1, 2, 3], function (value) {
return value * 2;
});
Orange.js now contains all the functionality of Microdash.
- Follow me on Twitter for updates: https://twitter.com/@asmblah