Socket
Socket
Sign inDemoInstall

@base2/pretty-print-object

Package Overview
Dependencies
0
Maintainers
1
Versions
9
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 1.0.1 to 1.0.2

24

dist/index.js

@@ -13,10 +13,13 @@ "use strict";

};
var __spreadArrays = (this && this.__spreadArrays) || function () {
for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;
for (var r = Array(s), k = 0, i = 0; i < il; i++)
for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)
r[k] = a[j];
return r;
var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
if (ar || !(i in from)) {
if (!ar) ar = Array.prototype.slice.call(from, 0, i);
ar[i] = from[i];
}
}
return to.concat(ar || Array.prototype.slice.call(from));
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.prettyPrint = void 0;
var seen = [];

@@ -111,3 +114,3 @@ /**

if (input instanceof Date) {
return "new Date('" + input.toISOString() + "')";
return "new Date('".concat(input.toISOString(), "')");
}

@@ -131,3 +134,3 @@ if (Array.isArray(input)) {

if (isObj(input)) {
var objKeys_1 = __spreadArrays(Object.keys(input), (getOwnEnumPropSymbols(input)));
var objKeys_1 = __spreadArray(__spreadArray([], Object.keys(input), true), (getOwnEnumPropSymbols(input)), true);
if (combinedOptions.filter) {

@@ -157,8 +160,7 @@ objKeys_1 = objKeys_1.filter(function (el) { return combinedOptions.filter && combinedOptions.filter(input, el); });

input = input.replace(/"/g, '\\"');
return "\"" + input + "\"";
return "\"".concat(input, "\"");
}
input = input.replace(/\\?'/g, '\\\'');
return "'" + input + "'";
return "'".concat(input, "'");
}
exports.prettyPrint = prettyPrint;
//# sourceMappingURL=index.js.map
{
"name": "@base2/pretty-print-object",
"version": "1.0.1",
"version": "1.0.2",
"description": "Convert an object or array into a formatted string",

@@ -29,3 +29,2 @@ "repository": {

"license": "BSD-2-Clause",
"dependencies": {},
"devDependencies": {

@@ -38,10 +37,12 @@ "@babel/core": "^7.4.3",

"@types/jest": "^24.0.13",
"@typescript-eslint/eslint-plugin": "^5.21.0",
"@typescript-eslint/parser": "^5.21.0",
"eslint": "^6.2.2",
"eslint-config-prettier": "^6.1.0",
"eslint-plugin-prettier": "^3.1.0",
"jest": "^24.8.0",
"jest": "^28.0.2",
"prettier": "^1.15.3",
"pretty-quick": "^1.8.0",
"typescript": "^3.6.2"
"typescript": "^4.3.5"
}
}
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc