Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

pretty-tree

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

pretty-tree - npm Package Compare versions

Comparing version 0.1.0 to 0.1.1

12

index.js
var archy = require('archy');
var colors = require('colors');
var chalk = require('chalk');

@@ -27,3 +27,3 @@ var isAtomic = function(v) {

if (!atomic.length && !nonAtomic.length) return ['(empty)'.grey];
if (!atomic.length && !nonAtomic.length) return [chalk.grey('(empty)')];

@@ -33,7 +33,7 @@ atomic.forEach(function(key) {

key = key+':'+pad.slice(key.length-pad.length-1);
nodes.push(isArray ? val : (key.cyan+val));
nodes.push(isArray ? val : (chalk.cyan(key)+val));
});
nonAtomic.forEach(function(key) {
nodes.push({label:isArray ? undefined : key.cyan, nodes:leaf(obj[key])});
nodes.push({label:isArray ? undefined : chalk.cyan(key), nodes:leaf(obj[key])});
});

@@ -45,3 +45,3 @@

var visit = function(node) {
if (node.label) node.label = node.label.yellow;
if (node.label) node.label = chalk.yellow(node.label);
if (node.nodes) node.nodes = [].concat(node.nodes).map(visit);

@@ -57,3 +57,3 @@ if (node.leaf) node.nodes = [].concat(node.nodes || [], leaf(node.leaf));

.replace(/[┬├─└│┐]/g, function(_) {
return _.grey;
return chalk.grey(_);
});

@@ -60,0 +60,0 @@ };

{
"name": "pretty-tree",
"version": "0.1.0",
"version": "0.1.1",
"description": "Make colorful trees out of JSON objects using archy",

@@ -8,3 +8,3 @@ "repository": "git://github.com/mafintosh/pretty-tree.git",

"archy": "0.0.2",
"colors": "~0.6.2"
"chalk": "~0.4.0"
},

@@ -11,0 +11,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