trie-js

WebJar for trie-js

Лицензия

Лицензия

MIT
Категории

Категории

JavaScript Языки программирования
Группа

Группа

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

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

trie-js
Последняя версия

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

1.0.0
Дата

Дата

Тип

Тип

jar
Описание

Описание

trie-js
WebJar for trie-js
Ссылка на сайт

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

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

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

https://github.com/ejlangev/trie-js

Скачать trie-js

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

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

Зависимости

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

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

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

trie-js

Javascript implementation of a Trie with customizable delimiters designed for use with the node environment.

Build Status

Installing

npm install trie-js

Creating a trie

// empty Trie with default delimiter
const trie = new Trie();

// trie with some initial values
const trie = new Trie(['abc', 'def']);

// trie with some initial values that are also iterable
const trie = new Trie([['a', 'b', 'c'], ['a', 'b', 'd']]);

// trie with custom object implementing iterator
const obj1 = {
  [Symbol.iterator]: function*() {
    yield 'a';
    yield 'b';
    yield 'd'
  }
}

const trie = new Trie([obj1]);

Adding, removing, and testing for values

const trie = new Trie();

// Adding is chainable
trie.add('abc')
  .add('def')
  .add('ghi');

// Removing is chainable
trie.remove('abc')
  .remove('def');

trie.lookup('abc') // false
trie.lookup('ghi') // true

Checking for prefixes

const trie = new Trie(['abc', 'def']);

trie.isPrefix('ab') // true
trie.isPrefix('abc') // false

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

Версия
1.0.0