$ npm i -D buid
# or
$ yarn add -D buid| 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 |
$ buid -p category.json -vimport buid from 'buid';
buid({ path: 'category.json' /* or an object itself */ });