ramped.make_object

0.2.0 • Public • Published

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

Readme

Keywords

none

Package Sidebar

Install

npm i ramped.make_object

Weekly Downloads

3

Version

0.2.0

License

ISC

Last publish

Collaborators

  • mattms