0.0.4 • Published 8 years ago
setnested v0.0.4
setnested
An easy way to get/set Javascript literals with path namespace
Why setnested
- Lightweight (~1kB min&gzip)
 - Array support
 - Object support
 - Creates when doesn't exist
 - Returns/Change when exist
 - Fast
 - Easy
 
CDN
Installing
$ npm install setnested
# or
$ yarn add setnestedUsing
// CommonJS / NodeJS
var nested = require('setnested');
// ES6
import { set, get } from 'setnested';
// Browser
// HTML Tag: <script src="https://unpkg.com/setnested"></script>
// Now you have access via `window.nested`Usage
var yourObject = nested.set({'myAccess.to.property': true})
};Methods
get
nested.get(yourObject, 'myAccess.to.property') // get value via stringset
nested.set(yourObject); // parsed objectLicense
Licensed under MIT-License, do everything, use it