Your IP : 216.73.216.86


Current Path : /home/emeraadmin/www/4d695/
Upload File :
Current File : /home/emeraadmin/www/4d695/archy.zip

PK4[�\�l(ѷ�package.jsonnu�[���{
  "_id": "archy@1.0.0",
  "_inBundle": true,
  "_location": "/npm/archy",
  "_phantomChildren": {},
  "_requiredBy": [
    "/npm"
  ],
  "author": {
    "name": "James Halliday",
    "email": "mail@substack.net",
    "url": "http://substack.net"
  },
  "bugs": {
    "url": "https://github.com/substack/node-archy/issues"
  },
  "description": "render nested hierarchies `npm ls` style with unicode pipes",
  "devDependencies": {
    "tap": "~0.3.3",
    "tape": "~0.1.1"
  },
  "homepage": "https://github.com/substack/node-archy#readme",
  "keywords": [
    "hierarchy",
    "npm ls",
    "unicode",
    "pretty",
    "print"
  ],
  "license": "MIT",
  "main": "index.js",
  "name": "archy",
  "repository": {
    "type": "git",
    "url": "git+ssh://git@github.com/substack/node-archy.git"
  },
  "scripts": {
    "test": "tap test"
  },
  "testling": {
    "files": "test/*.js",
    "browsers": {
      "iexplore": [
        "6.0",
        "7.0",
        "8.0",
        "9.0"
      ],
      "chrome": [
        "20.0"
      ],
      "firefox": [
        "10.0",
        "15.0"
      ],
      "safari": [
        "5.1"
      ],
      "opera": [
        "12.0"
      ]
    }
  },
  "version": "1.0.0"
}
PK4[�\]�}��test/multi_line.jsnu�[���var test = require('tape');
var archy = require('../');

test('multi-line', function (t) {
    var s = archy({
      label : 'beep\none\ntwo',
      nodes : [
        'ity',
        {
          label : 'boop',
          nodes : [
            {
              label : 'o_O\nwheee',
              nodes : [
                {
                  label : 'oh',
                  nodes : [ 'hello', 'puny\nmeat' ]
                },
                'creature'
              ]
            },
            'party\ntime!'
          ]
        }
      ]
    });
    t.equal(s, [
        'beep',
        '│ one',
        '│ two',
        '├── ity',
        '└─┬ boop',
        '  ├─┬ o_O',
        '  │ │ wheee',
        '  │ ├─┬ oh',
        '  │ │ ├── hello',
        '  │ │ └── puny',
        '  │ │     meat',
        '  │ └── creature',
        '  └── party',
        '      time!',
        ''
    ].join('\n'));
    t.end();
});
PK4[�\�a�test/non_unicode.jsnu�[���var test = require('tape');
var archy = require('../');

test('beep', function (t) {
    var s = archy({
      label : 'beep',
      nodes : [
        'ity',
        {
          label : 'boop',
          nodes : [
            {
              label : 'o_O',
              nodes : [
                {
                  label : 'oh',
                  nodes : [ 'hello', 'puny' ]
                },
                'human'
              ]
            },
            'party!'
          ]
        }
      ]
    }, '', { unicode : false });
    t.equal(s, [
        'beep',
        '+-- ity',
        '`-- boop',
        '  +-- o_O',
        '  | +-- oh',
        '  | | +-- hello',
        '  | | `-- puny',
        '  | `-- human',
        '  `-- party!',
        ''
    ].join('\n'));
    t.end();
});
PK4[�\���BBtest/beep.jsnu�[���var test = require('tape');
var archy = require('../');

test('beep', function (t) {
    var s = archy({
      label : 'beep',
      nodes : [
        'ity',
        {
          label : 'boop',
          nodes : [
            {
              label : 'o_O',
              nodes : [
                {
                  label : 'oh',
                  nodes : [ 'hello', 'puny' ]
                },
                'human'
              ]
            },
            'party!'
          ]
        }
      ]
    });
    t.equal(s, [
        'beep',
        '├── ity',
        '└─┬ boop',
        '  ├─┬ o_O',
        '  │ ├─┬ oh',
        '  │ │ ├── hello',
        '  │ │ └── puny',
        '  │ └── human',
        '  └── party!',
        ''
    ].join('\n'));
    t.end();
});
PK4[�\G�l�11LICENSEnu�[���This software is released under the MIT license:

Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the "Software"), to deal in
the Software without restriction, including without limitation the rights to
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
the Software, and to permit persons to whom the Software is furnished to do so,
subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
PK4[�\�
�Dttindex.jsnu�[���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('')
    ;
};
PK4[�\ʁՁ��examples/multi_line.jsnu�[���var archy = require('../');

var s = archy({
  label : 'beep\none\ntwo',
  nodes : [
    'ity',
    {
      label : 'boop',
      nodes : [
        {
          label : 'o_O\nwheee',
          nodes : [
            {
              label : 'oh',
              nodes : [ 'hello', 'puny\nmeat' ]
            },
            'creature'
          ]
        },
        'party\ntime!'
      ]
    }
  ]
});
console.log(s);
PK4[�\?鋃�examples/beep.jsnu�[���var archy = require('../');
var s = archy({
  label : 'beep',
  nodes : [
    'ity',
    {
      label : 'boop',
      nodes : [
        {
          label : 'o_O',
          nodes : [
            {
              label : 'oh',
              nodes : [ 'hello', 'puny' ]
            },
            'human'
          ]
        },
        'party\ntime!'
      ]
    }
  ]
});
console.log(s);
PK4[�\�l(ѷ�package.jsonnu�[���PK4[�\]�}���test/multi_line.jsnu�[���PK4[�\�a�	test/non_unicode.jsnu�[���PK4[�\���BBwtest/beep.jsnu�[���PK4[�\G�l�11�LICENSEnu�[���PK4[�\�
�Dtt]index.jsnu�[���PK4[�\ʁՁ��	examples/multi_line.jsnu�[���PK4[�\?鋃��examples/beep.jsnu�[���PKr�