Security News
Research
Data Theft Repackaged: A Case Study in Malicious Wrapper Packages on npm
The Socket Research Team breaks down a malicious wrapper package that uses obfuscation to harvest credentials and exfiltrate sensitive data.
node-stringify
Advanced tools
![Build Status](http://img.shields.io/travis/fuqcool/node-stringify.svg?style=flat-square) ![npm](http://img.shields.io/npm/v/node-stringify.svg?style=flat-square) ![Total Downloads](http://img.shields.io/npm/dm/node-stringify.svg?style=flat-square)
Stringify javascript objects and retrieve with eval
.
This library IS NOT designed to replace JSON.stringify
. Unless you truly understand what this library does, I suggest you use JSON.stringify
in the first place.
npm install node-stringify --save
var stringify = require('node-stringify');
console.assert(stringify(123) === '123');
console.assert(stringify('abc') === '\'abc\'');
console.assert(stringify(null) === 'null');
console.assert(stringify(undefined) === 'undefined');
console.assert(stringify(new Date(1000)) === 'new Date(1000)');
console.assert(stringify(function (a,b,c) {}) === '(function (a,b,c) {})');
console.assert(stringify([1, 2, 3]) === '[1,2,3]');
// The parenthesis is to make the result work with `eval`
console.assert(stringify({a: 1, b: 2}) === '({a:1,b:2})');
console.assert(stringify({a: 1, b: [2, 3]}) === '({a:1,b:[2,3]})');
// You can turn off the parenthesis too
console.assert(stringify({a: 1, b: 2}, {parenthesis:false}) === '{a:1,b:2}');
console.assert(stringify({a: 1, b: [2, 3]}, {parenthesis:false}) === '{a:1,b:[2,3]}');
JSON.stringify
node-stringify
can be retrieved directly using eval
(Please be aware that eval
may be insecure).MIT License.
FAQs
![Build Status](http://img.shields.io/travis/fuqcool/node-stringify.svg?style=flat-square) ![npm](http://img.shields.io/npm/v/node-stringify.svg?style=flat-square) ![Total Downloads](http://img.shields.io/npm/dm/node-stringify.svg?style=flat-square)
We found that node-stringify 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.
Security News
Research
The Socket Research Team breaks down a malicious wrapper package that uses obfuscation to harvest credentials and exfiltrate sensitive data.
Research
Security News
Attackers used a malicious npm package typosquatting a popular ESLint plugin to steal sensitive data, execute commands, and exploit developer systems.
Security News
The Ultralytics' PyPI Package was compromised four times in one weekend through GitHub Actions cache poisoning and failure to rotate previously compromised API tokens.