Socket
Socket
Sign inDemoInstall

telejson

Package Overview
Dependencies
Maintainers
2
Versions
49
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

telejson - npm Package Compare versions

Comparing version 5.0.0 to 5.0.1

78

dist/index.js

@@ -137,73 +137,73 @@ "use strict";

if ((0, _isRegex["default"])(value)) {
if (!options.allowRegExp) {
if (typeof value === 'boolean') {
return value;
}
if (value === undefined) {
if (!options.allowUndefined) {
return undefined;
}
return "_regexp_".concat(value.flags, "|").concat(value.source);
return '_undefined_';
}
if ((0, _isFunction["default"])(value)) {
if (!options.allowFunction) {
return undefined;
if (typeof value === 'number') {
if (value === -Infinity) {
return '_-Infinity_';
}
var name = value.name;
var stringified = value.toString();
if (value === Infinity) {
return '_Infinity_';
}
if (!stringified.match(/(\[native code\]|WEBPACK_IMPORTED_MODULE|__webpack_exports__|__webpack_require__)/)) {
return "_function_".concat(name, "|").concat(cleanCode(convertShorthandMethods(key, stringified)));
if (Number.isNaN(value)) {
return '_NaN_';
}
return "_function_".concat(name, "|").concat(function () {}.toString());
return value;
}
if ((0, _isSymbol["default"])(value)) {
if (!options.allowSymbol) {
return undefined;
if (typeof value === 'string') {
if (dateFormat.test(value)) {
if (!options.allowDate) {
return undefined;
}
return "_date_".concat(value);
}
return "_symbol_".concat(value.toString().slice(7, -1));
return value;
}
if (typeof value === 'string' && dateFormat.test(value)) {
if (!options.allowDate) {
if ((0, _isRegex["default"])(value)) {
if (!options.allowRegExp) {
return undefined;
}
return "_date_".concat(value);
return "_regexp_".concat(value.flags, "|").concat(value.source);
}
if (value === undefined) {
if (!options.allowUndefined) {
if ((0, _isFunction["default"])(value)) {
if (!options.allowFunction) {
return undefined;
}
return '_undefined_';
}
var name = value.name;
var stringified = value.toString();
if (typeof value === 'number') {
if (value === -Infinity) {
return '_-Infinity_';
if (!stringified.match(/(\[native code\]|WEBPACK_IMPORTED_MODULE|__webpack_exports__|__webpack_require__)/)) {
return "_function_".concat(name, "|").concat(cleanCode(convertShorthandMethods(key, stringified)));
}
if (value === Infinity) {
return '_Infinity_';
}
return "_function_".concat(name, "|").concat(function () {}.toString());
}
if (Number.isNaN(value)) {
return '_NaN_';
if ((0, _isSymbol["default"])(value)) {
if (!options.allowSymbol) {
return undefined;
}
return value;
return "_symbol_".concat(value.toString().slice(7, -1));
}
if (typeof value === 'string') {
return value;
}
if (typeof value === 'boolean') {
return value;
}
if (stack.length >= options.maxDepth) {

@@ -210,0 +210,0 @@ if (Array.isArray(value)) {

{
"name": "telejson",
"version": "5.0.0",
"version": "5.0.1",
"description": "",

@@ -5,0 +5,0 @@ "keywords": [

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