fancy-facets
v0.0.3
Published
Generates array of dash seperated keys from a nested object of true values
Downloads
3
Maintainers
Readme
Generates array of dash seperated keys from a nested object of true values
Install
$ npm install --save fancy-facets
Usage
var facets = require('fancy-facets');
facets({
'parent': {
'child1': true,
'child2': {
'grandchild1': true,
'grandchild2': false,
'grandchild3': true
},
'child3': false,
'child4: 'Bill'
}
});
// ->[ 'parent-child1', 'parent-child2-grandchild1', 'parent-child2-grandchild3', 'parent-child4-bill']
License
MIT © Ray Gerrard