0.10.1 • Published 9 years ago
blood v0.10.1
blood
JavaScript object life
npm install blood --saveAPI
Creation
blood.child(parent)create object that inheritsparent(emulatesObject.create)blood.create(parent)alias forblood.child(parent)blood.orphan()emulatesObject.create(null)blood.twin(object)create twin objectblood.combine(keys, values)create object from corresponding keys and values arraysblood.pair(pairs)create object from pairsblood.invert(object)create new object by inverting keys and values
Mutation
blood.assign(to, ...from)emulates ES6Object.assignblood.adopt(...from)assign tothisblood.foster(child, parent)force child to have a new parent (ES6+)
Reflection
blood.has(object, key)test ifobjectownskeyblood.parent(object)emulatesObject.getPrototypeOfblood.parents(object)get array of parents (up the prototype chain)blood.chain(object)equals[object].concat(blood.parents(object))blood.keys(object)emulatesObject.keysblood.names(object)emulatesObject.getOwnPropertyNamesblood.values(object)get array of own enumerable valuesblood.methods(object)get array of own enumerable functionsblood.enums(object)get array of all enumerable valuesblood.pairs(object)get array of[key, value]pairs
Developers
npm install
npm testCompatibility
Works in Node.js and modern browsers (ES5+ except where noted ES6+)
Fund
Fund opensource development =)
Playground
0.10.1
9 years ago
0.10.0
9 years ago
0.9.1
9 years ago
0.9.0
9 years ago
0.8.0
11 years ago
0.7.1
12 years ago
0.7.0
12 years ago
0.6.1
12 years ago
0.6.0
12 years ago
0.5.5
12 years ago
0.5.4
12 years ago
0.5.2
12 years ago
0.5.1
12 years ago
0.5.0
12 years ago
0.4.1
12 years ago
0.4.0
12 years ago
0.3.4
12 years ago
0.1.0
13 years ago