Comparing version 1.1.0 to 1.1.1
@@ -15,2 +15,4 @@ const _ = require('lodash'); | ||
const getFunctionSize = o => typeof o === 'function' && o.toString().split('\n').length; | ||
const getConstructor = v => { | ||
@@ -47,3 +49,3 @@ if (v === null) { | ||
const { maxItems = 30 } = options || {}; | ||
const { maxItems = 30, maxLines = 1 } = options || {}; | ||
@@ -65,2 +67,7 @@ return stringifyObject(object, { | ||
const functionSize = getFunctionSize(value); | ||
if (functionSize > maxLines) { | ||
return style(`Function ${value.name || ''}`, 'dim'); | ||
} | ||
const ctr = getConstructor(value); | ||
@@ -67,0 +74,0 @@ |
{ | ||
"name": "q-i", | ||
"version": "1.1.0", | ||
"version": "1.1.1", | ||
"description": "Node.js objects inspector with color highlighting", | ||
@@ -9,4 +9,4 @@ "author": { | ||
}, | ||
"homepage": "https://github.com/sapegin/Artem Sapegin", | ||
"repository": "sapegin/Artem Sapegin", | ||
"homepage": "https://github.com/sapegin/q-i", | ||
"repository": "sapegin/q-i", | ||
"license": "MIT", | ||
@@ -13,0 +13,0 @@ "engines": { |
@@ -15,2 +15,3 @@ # q-i: Node.js objects inspector with color highlighting | ||
* Color highlighted | ||
* Prints the whole object or only the part you need | ||
* Collapses huge arrays and objects (more than 30 items by default) | ||
@@ -17,0 +18,0 @@ |
No bug tracker
MaintenancePackage does not have a linked bug tracker in package.json.
Found 1 instance in 1 package
No website
QualityPackage does not have a website.
Found 1 instance in 1 package
6389
71
1
0
81