Skip to content

Latest commit

 

History

History

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 

README.md

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