@nodifier/json
TypeScript icon, indicating that this package has built-in type declarations

1.0.0 • Public • Published

@nodifier/json

Utils for various JSON related tasks

How to use?

You can import the module to your code as follows:

import { tryParseJson } from "@nodify/json";

tryParseJson

import { tryParseJson } from "@nodify/json";

const jsonObject = tryParseJson('{\"foo\":\"bar\"}');

The above will return a JSON object and it will return the string as is if it is not JSON compliance.

isStrJson

import { isStrJson } from "@nodify/json";

const output = isStrJson('{\"foo\":\"bar\"}');

The above will return a boolean flag if the given string is a JSON compliance or not.

Package Sidebar

Install

npm i @nodifier/json

Weekly Downloads

1

Version

1.0.0

License

ISC

Unpacked Size

70.2 kB

Total Files

19

Last publish

Collaborators

  • gamemasterdev