All Projects → antonmedv → asciitree

antonmedv / asciitree

Licence: MIT license
Draw vertical ASCII tree

Programming Languages

javascript
184084 projects - #8 most used programming language

Draw ASCII tree

npm install asciitree

Usage

var draw_tree = require('./asciitree');

var tree = ['root', 'child 1', ['child 2', 'node']];

console.log(draw_tree(tree));

Result:

      root___
     /       \
  child 1  child 2
              |
            node

Examples

        1___
       /    \
      2      3
     / \    / \
    4   5  6   7
   / \        / \
  8   9      10 11
      SELECT_________________
     /            \          \
    .___         FROM       JOIN
   /    \          |       /    \
  a  city_name  people  address ON
                                 |
                                 =___________
                                /            \
                               .____          .
                              /     \        / \
                              p  address_id  a  id
     div_______________________________________________________________________________
    /   \                      \    \                      \    \                      \
  text  div_________________  text  div_________________  text  div_________________  text
       /   \    \     \     \      /   \    \     \     \      /   \    \     \     \
     text   i  text  span  text  text   i  text  span  text  text   i  text  span  text
                       |                           |                           |
                     text                        text                        text
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].