1.0.0 • Published 9 years ago
deindex v1.0.0
deindex 
Flatten an object with
indexkeys
Useful for representing modular folder structures with index.* files as the "main" file in a proper tree.
Install
$ npm install --save deindexUsage
var deindex = require('deindex')
deindex({foo: {bar: {index: 'baz'}}})
//=> {foo: {bar: 'baz'}}API
deindex(obj) -> object
obj
Required
Type: object
Traverses the object and returns a new object with lone index keys flattened out.
License
MIT © Ben Drucker
1.0.0
9 years ago