@lunjs/archy
TypeScript icon, indicating that this package has built-in type declarations

0.1.0 • Public • Published

@lunjs/archy

Installation

npm install @lunjs/archy

Usage

const archy = require('@lunjs/archy');
const s = archy.draw({
  label : 'beep',
  nodes : [
    'ity',
    {
      label : 'boop',
      nodes : [
        {
          label : 'o_O',
          nodes : [
            {
              label : 'oh',
              nodes : [ 'hello', 'puny' ]
            },
            'human'
          ]
        },
        'party\ntime!'
      ]
    }
  ]
});
console.log(s);

Output

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

Options

Key Value
style default is 'NPM', support 'NPM' or 'FMW'
label default is 'label', support function
nodes default is 'nodes', support function
unicode default is true
drawRootBranch default is false
prefix default is ''
concurrency default is Infinity, only for drawAsync

Inspired by

License

Package Sidebar

Install

npm i @lunjs/archy

Weekly Downloads

20

Version

0.1.0

License

MIT

Unpacked Size

8.41 kB

Total Files

5

Last publish

Collaborators

  • jkeylu