Share your code. Components are building blocks, you are the architect.

global/json-validator
v0.0.2
0.0.2
0.0.1
In json
MIT
PUBLIC
117
0     DEPENDENCIES
Build: pass
BuildPass
Build Status: pass
Validate json string

Please configure Bit as a scoped registry to install components with NPM.Learn more

npm config set '@bit:registry' https://node.bitsrc.io
Use global/json-validator in your project
npm i @bit/amit.json.global.json-validator
Copied

jsonValidator (str:string)

Validate json string

Example

```js
const vaildateJson = require('bit/global/json-validator');
vaildateJson(jsonStr).catch(err => console.log(err))
```

Argument

str: string

Returns

promise

Test Summary


validate json string validate proper json strPass
validate json string when sending number should get exceptionPass
validate json string when sending broken json should get exceptionPass