Skip to content

writetome51/get-object-from-json

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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';

About

A more helpful alternative to JSON.parse()

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published