npm.io
0.0.1-alpha.2 • Published 9 years ago

lens.over

Licence
MIT
Version
0.0.1-alpha.2
Deps
2
Vulns
0
Weekly
0

lens.over

Following implementation of ramda.over

example

const helloWorld = {hello: [{place: 'world'}]}

const lensPath = ['hello', 0, 'place'];
const helloBigWorld = over(lensPath, (i) => i.toUpperCase(), helloWorld);

console.log(helloBigWorld); // {hello: [{place: 'WORLD'}]}
console.log(helloWorld === helloBigWorld); // false