@nindaff/ascii-tree

0.0.2 • Public • Published

ASCII Tree

WIP. More to come soon.

Turn This

const tree = {
  value: 'Foo',
  children: [
    {
      value: 'Bar',
      children: [
        'Bar-1',
        'Bar-2',
      ]
    },
    {
      value: 'Bang',
      children: [
        {
          value: 'Bang-1',
          children: [
            'Bang-1-1',
            'Bang-1-2',
            'Bang-1-3',
          ]
        },
        'Bang-2',
      ],
    },
  ],
};

Into This

                                  Foo                                 
          __________________________|_______                          
          |                                |                          
        Bar                              Bang                         
     _____|___                       ______|_________________         
     |       |                       |                      |         
  Bar-1   Bar-2                   Bang-1                 Bang-2       
                         ____________|__________                      
                         |          |          |                      
                     Bang-1-1   Bang-1-2   Bang-1-3                   

Readme

Keywords

none

Package Sidebar

Install

npm i @nindaff/ascii-tree

Weekly Downloads

34

Version

0.0.2

License

MIT

Unpacked Size

296 kB

Total Files

33

Last publish

Collaborators

  • nindaff