Socket
Socket
Sign inDemoInstall

dumper.js

Package Overview
Dependencies
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

dumper.js - npm Package Compare versions

Comparing version 1.1.1 to 1.2.0

18

package.json
{
"name": "dumper.js",
"version": "1.1.1",
"version": "1.2.0",
"description": "A better and pretty variable inspector for your Node.js applications.",

@@ -12,3 +12,3 @@ "main": "index.js",

"type": "git",
"url": "git+https://github.com/zeeshanu/dumper.js.git"
"url": "git+https://github.com/ziishaned/dumper.js.git"
},

@@ -25,12 +25,12 @@ "keywords": [

"bugs": {
"url": "https://github.com/zeeshanu/dumper.js/issues"
"url": "https://github.com/ziishaned/dumper.js/issues"
},
"homepage": "https://github.com/zeeshanu/dumper.js#readme",
"homepage": "https://github.com/ziishaned/dumper.js#readme",
"devDependencies": {
"chai": "^4.1.2",
"codecov": "^3.0.4",
"eslint": "^5.2.0",
"chai": "^4.2.0",
"codecov": "^3.1.0",
"eslint": "^5.6.1",
"istanbul": "^0.4.5",
"mocha": "^5.2.0",
"prettier": "^1.14.0"
"prettier": "^1.14.3"
},

@@ -41,4 +41,4 @@ "dependencies": {

"kind-of": "^6.0.2",
"kleur": "^2.0.1"
"kleur": "^2.0.2"
}
}
<h1 align="center">
<img height="150" src="https://cdn.rawgit.com/zeeshanu/dumper.js/master/logo.svg" alt="Dumper.js - Dumps information about a variable" />
<img height="150" src="https://cdn.rawgit.com/ziishaned/dumper.js/master/logo.svg" alt="Dumper.js - Dumps information about a variable" />
<br> Dumper.js
</h1>
<p align="center">
<a href="https://travis-ci.org/zeeshanu/dumper.js">
<img src="https://img.shields.io/travis/zeeshanu/dumper.js/master.svg?style=flat-square" alt="Build Status">
<a href="https://travis-ci.org/ziishaned/dumper.js">
<img src="https://img.shields.io/travis/ziishaned/dumper.js/master.svg?style=flat-square" alt="Build Status">
</a>
<a href="https://github.com/zeeshanu/dumper.js">
<img src="https://img.shields.io/codecov/c/github/zeeshanu/dumper.js.svg?style=flat-square" alt="Codecov">
<a href="https://github.com/ziishaned/dumper.js">
<img src="https://img.shields.io/codecov/c/github/ziishaned/dumper.js.svg?style=flat-square" alt="Codecov">
</a>

@@ -81,2 +81,2 @@ <a href="#">

MIT &copy; [Zeeshan Ahmed](https://twitter.com/zeeshanu)
MIT &copy; [Zeeshan Ahmad](https://twitter.com/ziishaned)
/* eslint-disable no-console */
const callerId = require('caller-id');
let Dumper = require('./dumper');
const Dumper = require('./dumper');

@@ -6,0 +6,0 @@ function dd(obj) {

/* eslint-disable no-console */
const callerId = require('caller-id');
let Dumper = require('./dumper');
const Dumper = require('./dumper');

@@ -6,0 +6,0 @@ function dump(obj) {

@@ -48,3 +48,3 @@ const kindOf = require('kind-of');

// preparing the inspection output
for (let itemKey in toDump) {
for (const itemKey in toDump) {
if (!Object.prototype.hasOwnProperty.call(toDump, itemKey)) {

@@ -93,2 +93,5 @@ continue;

break;
case 'undefined':
displayValue = blue('undefined');
break;
case 'number':

@@ -125,15 +128,13 @@ displayType = Number.isInteger(originalValue) ? 'int' : 'float';

makeArrowString(paramType, indent, key, valueDump) {
if (paramType === 'array') {
if (typeof key === 'string') {
return `${indent}${this.spaces}'${key}' => ${valueDump},\n`;
}
const startWith = `${indent}${this.spaces}`;
const valuePart = `${valueDump},\n`;
return `${indent}${this.spaces}[${key}] => ${valueDump},\n`;
let keyPart;
if (Number.isInteger(parseInt(key)) || (paramType === 'array' && typeof key !== 'string')) {
keyPart = `[${key}]`;
} else {
keyPart = `'${key}'`;
}
if (Number.isInteger(parseInt(key))) {
return `${indent}${this.spaces}[${key}] => ${valueDump},\n`;
}
return `${indent}${this.spaces}'${key}' => ${valueDump},\n`;
return `${startWith + keyPart} => ${valuePart}`;
}

@@ -140,0 +141,0 @@ }

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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