+1
-1
@@ -5,3 +5,3 @@ { | ||
| "description": "JavaScript Super Notation (JSON + circular refs + dates + (optional)functions)", | ||
| "version": "1.0.1", | ||
| "version": "1.0.2", | ||
| "keywords": [], | ||
@@ -8,0 +8,0 @@ "dependencies": { |
+6
-4
@@ -37,2 +37,6 @@ function type(val){ | ||
| } | ||
| function trim(str) { | ||
| if (typeof str.trim === 'function') return str.trim(); | ||
| return str.replace(/^ +/, '').replace(/ +$/, ''); | ||
| } | ||
@@ -104,3 +108,3 @@ exports.stringify = stringify; | ||
| if (from.constructor != Object) { | ||
| to['_jssn_proto'] = /^function([^\(]+)\(/.exec(from.constructor.toString())[1].trim(); | ||
| to['_jssn_proto'] = trim(/^function([^\(]+)\(/.exec(from.constructor.toString())[1]); | ||
| } | ||
@@ -149,5 +153,3 @@ var k = keys(from); | ||
| if (!parsed) console.log(json.stringify(o)); | ||
| var args = filter(map(parsed[1].split(','), | ||
| function (a) { return a.trim(); }), | ||
| function (a) { return a; }); | ||
| var args = filter(map(parsed[1].split(','), trim), function (a) { return a; }); | ||
| args.push(parsed[2]); | ||
@@ -154,0 +156,0 @@ return Function.apply(null, args); |
+1
-1
| { | ||
| "name": "jssn", | ||
| "version": "1.0.1", | ||
| "version": "1.0.2", | ||
| "description": "JavaScript Super Notation (JSON + circular refs + dates + (optional)functions)", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
Sorry, the diff of this file is too big to display
Uses eval
Supply chain riskPackage uses dynamic code execution (e.g., eval()), which is a dangerous practice. This can prevent the code from running in certain environments and increases the risk that the code may contain exploits or malicious behavior.
Found 1 instance in 1 package
Dynamic require
Supply chain riskDynamic require can indicate the package is performing dangerous or unsafe dynamic code execution.
Found 1 instance in 1 package
URL strings
Supply chain riskPackage contains fragments of external URLs or IP addresses, which the package may be accessing at runtime.
Found 1 instance in 1 package
Uses eval
Supply chain riskPackage uses dynamic code execution (e.g., eval()), which is a dangerous practice. This can prevent the code from running in certain environments and increases the risk that the code may contain exploits or malicious behavior.
Found 1 instance in 1 package
Dynamic require
Supply chain riskDynamic require can indicate the package is performing dangerous or unsafe dynamic code execution.
Found 1 instance in 1 package
Long strings
Supply chain riskContains long string literals, which may be a sign of obfuscated or packed code.
Found 1 instance in 1 package
URL strings
Supply chain riskPackage contains fragments of external URLs or IP addresses, which the package may be accessing at runtime.
Found 1 instance in 1 package
151322
0.24%5637
0.27%8
-38.46%