fast-json-parse
It is equivalent to json-parse-safe,
but it set both the err
and value
property to null.
The reason why this is fast is that try/catch
inhibits the functions
in which you use them to be optimized. This assumption holds true up to
Node 6, from Node 7 and forward this module is not useful anymore.
Install
npm i fast-json-parse --save
Usage
You can use it as a function or via a contructor, as you prefer.
function
'use strict' var parse = var fs = var result = if resulterr console else console
constructor
'use strict' var Parse = var fs = var result = fs if resulterr console else console
Acknowledgements
fast-json-parse is sponsored by nearForm.
License
MIT