SaveJS
A simple javascript util library.
APIs
get(object, path, defaultValue)#
Given an object and a path, return the path value of the object.
save 'hello'save 'world'save undefinedsave 'jack'
hasOwn
Given an object and a path, return if the object contains the path.
save truesave truesave falsesave true
paths
Given an object/array, return all its paths and corresponding values.
save path: 'a' value: 1 path: 'b' 'c' value: 2 path: 'b' 'd' value: 3 path: 'f' value: 7 // you may also want to concat the path with '.', // just put it as the second parameter save path: 'a' value: 1 path: 'b.c' value: 2 path: 'b.d' value: 3 path: 'f' value: 7
License
MIT