0.0.3 • Published 9 years ago

fancy-facets v0.0.3

Weekly downloads
1
License
MIT
Repository
github
Last release
9 years ago

NPM version Build Status Dependency Status

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