Miss any of our Open RFC calls?Watch the recordings here! »

fancy-facets

0.0.3 • Public • Published

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

Install

npm i fancy-facets

DownloadsWeekly Downloads

3

Version

0.0.3

License

MIT

Last publish

Collaborators

  • avatar