Comparing version 5.2.0 to 5.3.0
@@ -187,2 +187,6 @@ "use strict"; | ||
if (typeof value === 'bigint') { | ||
return "_bigint_".concat(value.toString()); | ||
} | ||
if (typeof value === 'string') { | ||
@@ -228,2 +232,8 @@ if (dateFormat.test(value)) { | ||
var globalRegistryKey = Symbol.keyFor(value); | ||
if (globalRegistryKey !== undefined) { | ||
return "_gsymbol_".concat(globalRegistryKey); | ||
} | ||
return "_symbol_".concat(value.toString().slice(7, -1)); | ||
@@ -376,2 +386,6 @@ } | ||
if (typeof value === 'string' && value.startsWith('_gsymbol_')) { | ||
return Symbol["for"](value.replace('_gsymbol_', '')); | ||
} | ||
if (typeof value === 'string' && value === '_-Infinity_') { | ||
@@ -389,2 +403,6 @@ return -Infinity; | ||
if (typeof value === 'string' && value.startsWith('_bigint_') && typeof BigInt === 'function') { | ||
return BigInt(value.replace('_bigint_', '')); | ||
} | ||
return value; | ||
@@ -391,0 +409,0 @@ }; |
{ | ||
"name": "telejson", | ||
"version": "5.2.0", | ||
"version": "5.3.0", | ||
"description": "", | ||
@@ -29,4 +29,12 @@ "keywords": [ | ||
"types": "dist/index.d.ts", | ||
"module": "dist/index.mjs", | ||
"exports": { | ||
"import": "./dist/index.mjs", | ||
"require": "./dist/index.js" | ||
}, | ||
"scripts": { | ||
"build": "babel src --out-dir dist --extensions \".ts\" && tsc --emitDeclarationOnly", | ||
"build:cjs": "babel src --out-dir dist --extensions \".ts\" --out-file-extension .js", | ||
"build:esm": "BABEL_ESM=true babel src --out-dir dist --extensions \".ts\" --out-file-extension .mjs", | ||
"build:tsc": "tsc --emitDeclarationOnly", | ||
"build": "yarn build:cjs && yarn build:esm && yarn build:tsc", | ||
"lint": "eslint src --ext .js,.ts", | ||
@@ -33,0 +41,0 @@ "prepublish": "yarn build", |
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
42916
10
822
6