1.0.1 • Published 10 years ago

object-apply v1.0.1

Weekly downloads
4
License
MIT
Repository
github
Last release
10 years ago

object-apply

NPM version build status Test coverage

Map a transformation to every value in an object.

Installation

$ npm i --save object-apply

Overview

var apply = require('object-apply');

var target = {
  foo: 1,
  bar: 2
};

// apply transformation to object

apply(target, function(arg) {
  return arg * arg;
});
// => {foo: 1, bar: 4}

License

MIT © Yoshua Wuyts