just-is-json
1.0.0 • Public • Published just-is-json
Just check if a string is a valid JSON string
Installation
API
const isJSON = require("just-is-json");
isJSON('{"foo":"bar"}');
isJSON("1");
isJSON("null");
isJSON("[1,2,3]");
isJSON(1);
isJSON(null);
isJSON("true");
isJSON(true);
isJSON("not-json");
isJSON([1, 2, 3]);
isJSON({ foo: "bar" });
isJSON('{"foo":"bar}');
Package Sidebar
Install
Weekly Downloads