Skip to content

andyscott/lenses

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Lenses for javascript.

Minimal, and no external dependencies (except for building/testing).

#Licensing See the license for licensing.

#Example

var Lense = require('lense').Lense
lense = Lense.parse('foo.bar[1].a')

obj = {
  "foo": {
    "bar": [
      1,
      { "a": 2 }
    ]
  }
}

console.log(lense.get(obj)) // > 2
lense.set(obj, 4000)
console.log(lense.get(obj)) // > 4000

#Documentation See the source for more documentation.

About

Lenses for javascript

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published