Research
Security News
Malicious npm Packages Inject SSH Backdoors via Typosquatted Libraries
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
This is a JSON parser for the Bennu parser combinator library. This module is good for:
JSON.parse
function is not available
(though other polyfills may be more performant).This module exports parsers for json
, array
, object
, number
, and
string
. Using the json parser to parse strings into objects requires using
the Bennu library.
var bennu = require('bennu');
var json = require('bennu-json').json;
function jsonParse(str) {
return bennu.parse.run(
bennu.lang.then(json, bennu.parse.eof),
str.trim()
);
}
console.log(jsonParse('{"a": [-5.12e100, null]}'));
// { a: [ -5.12e+100, null ] }
You can also do incremental parsing with Bennu:
var bennu = require('bennu');
var json = require('bennu-json').json;
var s1 = bennu.incremental.runInc(bennu.lang.then(json, bennu.parse.eof));
var s2 = bennu.incremental.provideString('[123,45', s1);
var s3 = bennu.incremental.provideString('6,789]', s2);
console.log(bennu.incremental.finish(s3));
// [ 123, 456, 789 ]
FAQs
A JSON parser for Bennu.
The npm package bennu-json receives a total of 2 weekly downloads. As such, bennu-json popularity was classified as not popular.
We found that bennu-json demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
Security News
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
Security News
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
Security News
In this segment of the Risky Business podcast, Feross Aboukhadijeh and Patrick Gray discuss the challenges of tracking malware discovered in open source softare.