Share your code. Components are building blocks, you are the architect.

utils/lens-prop
v1.0.0
1.0.0
MIT
PUBLIC
0
1     DEPENDENCIES
Build: none
BuildNone
Returns a lens whose focus is the specified property.

Please configure Bit as a scoped registry to install components with NPM.Learn more

npm config set '@bit:registry' https://node.bitsrc.io
Use utils/lens-prop in your project
npm i @bit/bit.ramda.utils.lens-prop
Copied

lensProp (k:String) : Lens

Returns a lens whose focus is the specified property.

Example

var xLens = R.lensProp('x');

     R.view(xLens, {x: 1, y: 2});            //=> 1
     R.set(xLens, 4, {x: 1, y: 2});          //=> {x: 4, y: 2}
     R.over(xLens, R.negate, {x: 1, y: 2});  //=> {x: -1, y: 2}

Argument

k: String

Returns

Lens