Comparing version 1.0.10 to 1.0.11
13
index.js
@@ -10,5 +10,14 @@ 'use strict' | ||
v8.setFlagsFromString('--allow-natives-syntax') | ||
var flatstr = Function('s', 'return typeof s === "string" ? %FlattenString(s) : s') | ||
var _flatstr = Function('s', 'return typeof s === "string" ? %FlattenString(s) : s') | ||
var flatstr = (s) => { | ||
try { | ||
return _flatstr(s) | ||
} catch (e) { | ||
v8.setFlagsFromString('--allow-natives-syntax') | ||
_flatstr = Function('s', 'return typeof s === "string" ? %FlattenString(s) : s') | ||
v8.setFlagsFromString('--no-allow-natives-syntax') | ||
return s | ||
} | ||
} | ||
v8.setFlagsFromString('--no-allow-natives-syntax') | ||
process.nextTick(flatstr, '') | ||
} catch (e) { | ||
@@ -15,0 +24,0 @@ var flatstr = function flatstr(s) { |
{ | ||
"name": "flatstr", | ||
"version": "1.0.10", | ||
"version": "1.0.11", | ||
"description": "Flattens the underlying C structures of a concatenated JavaScript string", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
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
13100
327
3