Comparing version 1.0.7 to 1.0.8
23
index.js
'use strict' | ||
try { | ||
var flatstr = Function('s', 'return typeof s === "string" ? %FlattenString(s) : s') | ||
} catch (e) { | ||
if (!process.versions || !process.versions.node || parseInt(process.versions.node.split('.')[0]) >= 10) { | ||
try { | ||
var v8 = require('v' + '8') | ||
v8.setFlagsFromString('--allow-natives-syntax') | ||
var flatstr = Function('s', 'return typeof s === "string" ? %FlattenString(s) : s') | ||
v8.setFlagsFromString('--no-allow-natives-syntax') | ||
} catch (e) { | ||
var flatstr = function flatstr(s) { | ||
Number(s) | ||
return s | ||
try { | ||
var v8 = require('v' + '8') | ||
v8.setFlagsFromString('--allow-natives-syntax') | ||
var flatstr = Function('s', 'return typeof s === "string" ? %FlattenString(s) : s') | ||
v8.setFlagsFromString('--no-allow-natives-syntax') | ||
} catch (e) { | ||
var flatstr = function flatstr(s) { | ||
Number(s) | ||
return s | ||
} | ||
} | ||
} | ||
} else flatstr = function flatstr(s) { | ||
Number(s) | ||
return s | ||
} | ||
module.exports = flatstr |
{ | ||
"name": "flatstr", | ||
"version": "1.0.7", | ||
"version": "1.0.8", | ||
"description": "Flattens the underlying C structures of a concatenated JavaScript string", | ||
"main": "index.js", | ||
"browser": { | ||
"v8": "./v8" | ||
}, | ||
"tags": [ | ||
@@ -24,4 +27,5 @@ "perf", | ||
"fastbench": "^1.0.1", | ||
"tap": "^5.7.0" | ||
} | ||
"tap": "^12.0.1" | ||
}, | ||
"dependencies": {} | ||
} |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
12758
7
317