Package Exports
- object-accessor
- object-accessor/access.js
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (object-accessor) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
object-accessor
a simple module to add a get/set to an object that is bound to an arbitrary data object and request deep items from it (something.someotherthing.somedeepthing), or alternatively fetch deep items directly through a data object
var access = require('object-accessor');
var data = { /* some data here*/ };
var object = access.augment({}, data);
object.get('somefield.subfield');
object.set('toplevelfield', 'some value');
//or
access.get(data, 'somefield.subfield');
access.set(data, 'toplevelfield', 'some value');
access.getAll(data, 'someList.*.subfield');
access.setAll(data, 'someList.*.subfield', 'some value');