0.2.0 • Published 9 years ago
mol-proto v0.2.0
proto
ES5-compatible object manipulation library for node and modern browsers
Documentation: http://milojs.github.io/proto/
Why not use underscore or lo-dash
- They do NOT use properties that are non-enumerable when they extend/clone/etc.
- They DO use enumerable properties from prototypes when they extend/clone/etc.
- When they clone, they create instances of Object rather than of the same class as cloned object.
- They implement many methods that are already implemented natively.
- They don't implement methods for inheritance and extention of prototypes.
- They create confusion when you read code as you can't clearly differentiate between arrays and objects (maps), e.g. when each function is used.
- Underscore has clumbersome chaining syntax, chaining in proto is more succinct.
Install
npm install mol-proto --save
To use and develop:
git clone git@github.com:milojs/proto.git
cd proto
npm link
cd ../<your project>
npm link mol-proto
Use
Node/browserify:
var _ = require('mol-proto');
Browser:
All functions are exported as properties of a global _ object when used with milo, there is no separate proto bundle yet (will be added shortly).
Functions
- find
- findIndex
- appendArray
- prependArray
- spliceItem
- toArray
- object
- mapToObject
- unique
- deepForEach
- Functions that Array implements natively are also added - they can be used with array-like objects and for chaining (native functions are always called).
0.2.0
9 years ago
0.1.15
9 years ago
0.1.14
9 years ago
0.1.13
9 years ago
0.1.12
9 years ago
0.1.11
9 years ago
0.1.10
10 years ago
0.1.9
10 years ago
0.1.8
10 years ago
0.1.7
10 years ago
0.1.6
10 years ago
0.1.5
10 years ago
0.1.4
10 years ago
0.1.3
10 years ago
0.1.2
10 years ago
0.1.1
10 years ago
0.1.0
10 years ago
0.0.5
10 years ago
0.0.4
10 years ago
0.0.2
10 years ago