Home
Docs
GitHub
Pricing
Blog
Log In

Run Sandworm Audit for your App

Get started
Hold on, we're currently generating a fresh version of this report
Generated on Mar 13, 2024 via pnpm

archy 1.0.0

render nested hierarchies `npm ls` style with unicode pipes
Package summary
Share
0
issues
1
license
1
MIT
Package created
8 Mar 2012
Version published
14 Sep 2014
Maintainers
1
Total deps
1
Direct deps
0
License
MIT

Issues

0
This package has no issues

Licenses

MIT License

Permissive
OSI Approved
This is a human-readable summary of (and not a substitute for) the license. Disclaimer.
Can
commercial-use
modify
distribute
sublicense
private-use
Cannot
hold-liable
Must
include-copyright
include-license
1 Packages, Including:
archy@1.0.0
Disclaimer

This deed highlights only some of the key features and terms of the actual license. It is not a license and has no legal value. You should carefully review all of the terms and conditions of the actual license before using the licensed material.

Sandworm is not a law firm and does not provide legal services. Distributing, displaying, or linking to this deed or the license that it summarizes does not create a lawyer-client or any other relationship.

Direct Dependencies

0
All Dependencies CSV
ⓘ This is a list of archy 's direct dependencies. Data on all dependencies, including transitive ones, is available via CSV download.
NameVersionSizeLicenseTypeVulnerabilities

Visualizations

Frequently Asked Questions

What does archy do?

The Archy npm package primarily renders nested hierarchies in a style similar to npm ls, using unicode pipe characters. It's an excellent tool for developers requiring visual presentation of nested JavaScript objects or arrays in a structured form.

How do you use archy?

To utilize Archy, start with installing it into your workspace by running npm install archy in your terminal. Once installed, it can be included in your JavaScript file using var archy = require('archy');.

The main use of the Archy package revolves around the archy(obj, prefix='', opts={}) function, which accepts an object or an array as a parameter, optionally accompanied by a string prefix and an options object. The object should have 'label' and 'nodes' fields. If a node is a string, that string is used as the 'label', with an empty array of 'nodes'.

Here's an example showcasing the usage of the Archy package:

var archy = require('archy');

var structuredData = archy({
    label : 'beep',
    nodes : [
        'ity',
        {
            label : 'boop',
            nodes : [
                {
                    label : 'o_O',
                    nodes : [
                        {
                            label : 'oh',
                            nodes : [ 'hello', 'puny' ]
                        },
                        'human'
                    ]
                },
                'party\ntime!'
            ]
        }
    ]
});
console.log(structuredData);

The result:

beep
├── ity
└─┬ boop
  ├─┬ o_O
  │ ├─┬ oh
  │ │ ├── hello
  │ │ └── puny
  │ └── human
  └── party
      time!

In case you want to output the results in an all-ansi format, you can set opts.unicode to false.

Where are the archy docs?

The official documentation for the Archy npm package is not separate but is included in the readme of the package's GitHub repository. The repository's URL is http://github.com/substack/node-archy.git. You'll find usage examples, installation instructions, and the API reference within the readme. Developers seeking to integrate the package into their JavaScript applications can refer to this resource for all necessary information.