Installations
npm install fast-json-parse
Releases
Unable to fetch releases
Developer
mcollina
Developer Guide
Module System
CommonJS
Min. Node Version
Typescript Support
No
Node Version
6.11.1
NPM Version
5.3.0
Statistics
88 Stars
13 Commits
6 Forks
5 Watching
1 Branches
3 Contributors
Updated on 27 Nov 2024
Languages
JavaScript (100%)
Total Downloads
Cumulative downloads
Total Downloads
631,799,018
Last day
-9.2%
654,231
Compared to previous day
Last week
1.8%
3,638,042
Compared to previous week
Last month
7.1%
15,516,704
Compared to previous month
Last year
-4.3%
171,272,304
Compared to previous year
Daily Downloads
Weekly Downloads
Monthly Downloads
Yearly Downloads
Dev Dependencies
5
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
1'use strict' 2 3var parse = require('fast-json-parse') 4var fs = require('fs') 5 6var result = parse(fs.readFileSync('./package.json', 'utf8')) 7 8if (result.err) { 9 console.log('unable to parse json', result.err.message) 10} else { 11 console.log('json parsed successfully', result.value) 12}
constructor
1'use strict' 2 3var Parse = require('fast-json-parse') 4var fs = require('fs') 5 6var result = new Parse(fs.readFileSync('./package.json')) 7 8if (result.err) { 9 console.log('unable to parse json', result.err.message) 10} else { 11 console.log('json parsed successfully', result.value) 12}
Acknowledgements
fast-json-parse is sponsored by nearForm.
License
MIT
No vulnerabilities found.
Reason
no binaries found in the repo
Reason
0 existing vulnerabilities detected
Reason
license file detected
Details
- Info: project has a license file: LICENSE:0
- Info: FSF or OSI recognized license: MIT License: LICENSE:0
Reason
Found 2/11 approved changesets -- score normalized to 1
Reason
0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
project is not fuzzed
Details
- Warn: no fuzzer integrations found
Reason
branch protection not enabled on development/release branches
Details
- Warn: branch protection not enabled for branch 'master'
Reason
security policy file not detected
Details
- Warn: no security policy file detected
- Warn: no security file to analyze
- Warn: no security file to analyze
- Warn: no security file to analyze
Reason
SAST tool is not run on all commits -- score normalized to 0
Details
- Warn: 0 commits out of 4 are checked with a SAST tool
Score
3.2
/10
Last Scanned on 2024-11-18
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn More