nested

Auto-vivifying complex datastructures

npm install nested
2 downloads in the last week
46 downloads in the last month

Nested

Construct arbitrary complex datastructures that are lazily instantiated:

Arrays of hashes

var nested = require('nested');
// array of hashes
var ds = nested([ {} ]);
ds(0)['foo'] = 'bar';

Hashes of arrays

var nested = require('nested');
// array of hashes
var ds = nested({ of: [] });
ds('foo')[0] = 'bar';

See examples directory for more examples.

npm loves you