Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

javascript-stringify

Package Overview
Dependencies
Maintainers
1
Versions
18
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

javascript-stringify - npm Package Compare versions

Comparing version 0.0.2 to 0.0.3

20

javascript-stringify.js

@@ -50,22 +50,6 @@ (function (root, stringify) {

*/
var getGlobalVariable = function () {
return 'global';
var getGlobalVariable = function (value, indent, stringify) {
return 'Function(' + stringify('return this;') + ')()';
};
/* istanbul ignore next */
if (typeof window === 'object' && typeof window.document === 'object') {
// Support browser environments.
getGlobalVariable = function () {
return 'window';
};
}
/* istanbul ignore next */
if (typeof self === 'object' && typeof self.importScripts === 'function') {
// Support web worker environments.
getGlobalVariable = function () {
return 'self';
};
}
/**

@@ -72,0 +56,0 @@ * Convert JavaScript objects into strings.

2

package.json
{
"name": "javascript-stringify",
"version": "0.0.2",
"version": "0.0.3",
"description": "Stringify is to `eval` as `JSON.stringify` is to `JSON.parse`",

@@ -5,0 +5,0 @@ "main": "javascript-stringify.js",

@@ -17,3 +17,2 @@ var expect = require('chai').expect;

it('object', test({ key: 'value', '-': 10 }, '{key:\'value\',\'-\':10}'));
it('global', test(global, 'global'));

@@ -28,2 +27,6 @@ it('NaN', test(NaN, 'NaN'));

it('Boolean', test(new Boolean(true), 'new Boolean(true)'));
it('global', function () {
expect(eval(stringify(global))).to.equal(global);
});
});

@@ -30,0 +33,0 @@

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc