buid
v0.3.1
Published
Semantic ID validator
Downloads
19
Maintainers
Readme
buid
$ npm i -D buid
# or
$ yarn add -D buid
Options
| 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 -v
Programmatic usage
import buid from 'buid';
buid({ path: 'category.json' /* or an object itself */ });