summaryrefslogtreecommitdiff
path: root/deps/node/deps/npm/node_modules/archy/index.js
diff options
context:
space:
mode:
Diffstat (limited to 'deps/node/deps/npm/node_modules/archy/index.js')
-rw-r--r--deps/node/deps/npm/node_modules/archy/index.js35
1 files changed, 0 insertions, 35 deletions
diff --git a/deps/node/deps/npm/node_modules/archy/index.js b/deps/node/deps/npm/node_modules/archy/index.js
deleted file mode 100644
index 869d64e6..00000000
--- a/deps/node/deps/npm/node_modules/archy/index.js
+++ /dev/null
@@ -1,35 +0,0 @@
-module.exports = function archy (obj, prefix, opts) {
- if (prefix === undefined) prefix = '';
- if (!opts) opts = {};
- var chr = function (s) {
- var chars = {
- '│' : '|',
- '└' : '`',
- '├' : '+',
- '─' : '-',
- '┬' : '-'
- };
- return opts.unicode === false ? chars[s] : s;
- };
-
- if (typeof obj === 'string') obj = { label : obj };
-
- var nodes = obj.nodes || [];
- var lines = (obj.label || '').split('\n');
- var splitter = '\n' + prefix + (nodes.length ? chr('│') : ' ') + ' ';
-
- return prefix
- + lines.join(splitter) + '\n'
- + nodes.map(function (node, ix) {
- var last = ix === nodes.length - 1;
- var more = node.nodes && node.nodes.length;
- var prefix_ = prefix + (last ? ' ' : chr('│')) + ' ';
-
- return prefix
- + (last ? chr('└') : chr('├')) + chr('─')
- + (more ? chr('┬') : chr('─')) + ' '
- + archy(node, prefix_, opts).slice(prefix.length + 2)
- ;
- }).join('')
- ;
-};