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.
stringify-obj
Advanced tools
Stringify an object/array like JSON.stringify just without all the double-quotes
Stringify an object/array like JSON.stringify just without all the double-quotes.
Useful for when you want to get the string representation of an object in a formatted way.
It also handles circular references and lets you specify quote type.
$ npm install --save stringify-object
var obj = {
foo: 'bar',
'arr': [1, 2, 3],
nested: { hello: "world" }
};
var pretty = stringifyObject(obj, {
indent: ' ',
singleQuotes: false
});
console.log(pretty);
/*
{
foo: "bar",
arr: [
1,
2,
3
],
nested: {
hello: "world"
}
}
*/
Accepts an object to stringify and optionally an option object. Circular references will be replaced with null
.
Type: string
Default: '\t'
Choose the indentation you prefer.
Type: boolean
Default: true
Set to false to get double-quoted strings.
BSD license and copyright Google
FAQs
Stringify an object/array like JSON.stringify just without all the double-quotes
We found that stringify-obj 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.