archy

WebJar for archy

Лицензия

Лицензия

MIT
Группа

Группа

org.webjars.npm
Идентификатор

Идентификатор

archy
Последняя версия

Последняя версия

1.0.0
Дата

Дата

Тип

Тип

jar
Описание

Описание

archy
WebJar for archy
Ссылка на сайт

Ссылка на сайт

http://webjars.org
Система контроля версий

Система контроля версий

http://github.com/substack/node-archy

Скачать archy

Имя Файла Размер
archy-1.0.0.pom
archy-1.0.0.jar 7 KB
archy-1.0.0-sources.jar 22 bytes
Обзор

Как подключить последнюю версию

<!-- https://jarcasting.com/artifacts/org.webjars.npm/archy/ -->
<dependency>
    <groupId>org.webjars.npm</groupId>
    <artifactId>archy</artifactId>
    <version>1.0.0</version>
</dependency>
// https://jarcasting.com/artifacts/org.webjars.npm/archy/
implementation 'org.webjars.npm:archy:1.0.0'
// https://jarcasting.com/artifacts/org.webjars.npm/archy/
implementation ("org.webjars.npm:archy:1.0.0")
'org.webjars.npm:archy:jar:1.0.0'
<dependency org="org.webjars.npm" name="archy" rev="1.0.0">
  <artifact name="archy" type="jar" />
</dependency>
@Grapes(
@Grab(group='org.webjars.npm', module='archy', version='1.0.0')
)
libraryDependencies += "org.webjars.npm" % "archy" % "1.0.0"
[org.webjars.npm/archy "1.0.0"]

Зависимости

Библиотека не имеет зависимостей. Это самодостаточное приложение, которое не зависит ни от каких других библиотек.

Модули Проекта

Данный проект не имеет модулей.

archy

Render nested hierarchies npm ls style with unicode pipes.

browser support

build status

example

var archy = require('archy');
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);

output

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

methods

var archy = require('archy')

archy(obj, prefix='', opts={})

Return a string representation of obj with unicode pipe characters like how npm ls looks.

obj should be a tree of nested objects with 'label' and 'nodes' fields. 'label' is a string of text to display at a node level and 'nodes' is an array of the descendents of the current node.

If a node is a string, that string will be used as the 'label' and an empty array of 'nodes' will be used.

prefix gets prepended to all the lines and is used by the algorithm to recursively update.

If 'label' has newlines they will be indented at the present indentation level with the current prefix.

To disable unicode results in favor of all-ansi output set opts.unicode to false.

install

With npm do:

npm install archy

license

MIT

Версии библиотеки

Версия
1.0.0