0.3.1 • Published 5 years ago
buid v0.3.1
buid
$ npm i -D buid
# or
$ yarn add -D buidOptions
| Flag | Data type | Description | Default |
|---|---|---|---|
-p--path | string or object | Path to the JSON file with data or an object | |
-c--chain | string[] | Chain of keys corresponding to the arrays in objects | ['criteria', 'requirementGroups', 'requirements', 'optionDetails', 'optionGroups', 'options'] |
-f--fix | boolean | Fix and return data | false |
-s--skip | string[] | Keys to skip while getting array in an object | ['optionDetails'] |
-l--segment-length | number | Length of corresponding id segment | 2 |
-v--verbose | boolean | Enable verbose logging | false |
--config | string | Path to the JSON configuration file |
CLI usage
$ buid -p category.json -vProgrammatic usage
import buid from 'buid';
buid({ path: 'category.json' /* or an object itself */ });