1.0.0 • Published 6 years ago
json-canparse v1.0.0
json-canparse
Checks if string can be parsed with JSON
Install
$ npm install json-canparse
Usage
require('json-canparse');
const goodJson = '{"foo": "bar"}';
const badJson = '{"foo:bar"}';
// Will be true
var yes = JSON.canParse(goodJson);
// Will be false
var no = JSON.canParse(badJson);
OK, let's be serious ... this is not a very sophisticated piece of software ;)
1.0.0
6 years ago