get-object-from-json
TypeScript icon, indicating that this package has built-in type declarations

2.0.1 • Public • Published

getObjectFromJSON(jsonString): object

getObjectFromJSON() is a more helpful alternative to JSON.parse().
The reason? Better error messages. If you pass anything other than a
string, you get 'Input must be string', and if the string is not strictly
formatted as JSON, you get 'Argument is not in JSON format'.

Installation

npm i get-object-from-json

Loading

import { getObjectFromJSON } from 'get-object-from-json';

Package Sidebar

Install

npm i get-object-from-json

Weekly Downloads

0

Version

2.0.1

License

MIT

Unpacked Size

2.77 kB

Total Files

5

Last publish

Collaborators

  • writetome51