node package manager


object inheritance and iteration utilities


cross-platform JavaScript object utility module with methods for inheritance and iteration

$ npm install blood

API (0.8)

  • Interoperables: Methods are generally compatible with those in underscore and lodash. Interchange libs based on needs.
  • Parameters labelled with ? are optional.
  • Read annotations and comments in the source.


  • blood.create(parent) uses Object.create if available
  • blood.twin(source, parent?) clone inheritance
  • blood.keys(object) uses Object.keys if available
  • blood.names(object) uses Object.getOwnPropertyNames if available
  • blood.values(object) get array of own enumerable values
  • blood.methods(object) get array of own enumerable functions
  • blood.pluck(object, key) get array of plucked values
  • blood.object(keys, values) get new object made from keys and values
  • blood.pick(object, *keys) get new object with keys
  • blood.omit(object, *keys) get new object without keys
  • blood.has(object, key) test if object owns key


  • blood.assign(receiver, supplier) emulates ES6 Object.assign
  • blood.assign(supplier) this receives
  • blood.adopt(supplier) this receives
  • blood.adopt(receiver, supplier, list) assign listed keys

@deprecated Iteration

accum callbacks receive (result, value, key, object)

  • blood.reduce(object, accum, init?, scope?) uses array-like iteration
  • blood.inject(object, accum, init?, scope?) iterates own properties

fn callbacks receive (value, key, object)

  • blood.every(object, fn, scope?) uses array-like iteration
  • blood.some(object, fn, scope?) uses array-like iteration
  •, fn, scope?) uses array-like iteration
  • blood.all(object, fn, scope?) iterates own properties
  • blood.any(object, fn, scope?) iterates own properties
  • blood.collect(object, fn, scope?) iterates own properties


Contribute by making edits in /src or reporting issues.

$ npm install -g grunt-cli # install grunt-cli if you haven't already 
$ npm install # install devDependencies from package.json 
$ grunt test # run tests 


Fund development with tips to @ryanve =)