0.2.0 • Published 8 years ago

ramped.make_object v0.2.0

Weekly downloads
3
License
ISC
Repository
github
Last release
8 years ago

Ramped make object

Build properties of an object from functions applied to a single argument.

Like Ramda applySpec, but only accepts a single argument. Which is similar to Ramda.evolve but this passes in the entire object instead of just the value of each key.

Install

To add as a dependency to a Node.js project:

npm i ramped.make_object --save

Usage

make_object = require('ramped.make_object')

convert = make_object({
	c: R.prop('a'),
	d: R.prop('b')
})

new_object = convert({a: 1, b: 2})
// {c: 1, d: 2}

License

ISC

0.2.0

8 years ago

0.1.0

8 years ago