isjsonstring

1.0.2 • Public • Published

isJSONString

This module provides a function for JSON string validation

Install

npm i isjsonstring

How to use

const isJSONString = require('isjsonstring');
 
console.log(isJSONString("1")); // true
console.log(isJSONString(1)); // false
console.log(isJSONString("{a:1}")); // false
console.log(isJSONString('{"a":1}')); // true

Dependents (1)

Package Sidebar

Install

npm i isjsonstring

Weekly Downloads

105

Version

1.0.2

License

ISC

Unpacked Size

859 B

Total Files

3

Last publish

Collaborators

  • michelemilani