# @lsby/trie-tree

> 一个 ts 实现的字典树.

Latest version **0.0.7** (published 2026-01-07) · GPL-3.0-or-later license · 0 weekly downloads

## Install

```sh
npm install @lsby/trie-tree
pnpm add @lsby/trie-tree
yarn add @lsby/trie-tree
bun add @lsby/trie-tree
```

## Health

**Score 55/100 (C)** — status: stable.

Positive: has types; no vulnerabilities; high quality score.

Warnings: low downloads; no esm support; pre 1.0.

## Facts

| | |
|---|---|
| Version | 0.0.7 |
| Published | 2026-01-07 |
| First published | 2022-11-08 |
| Weekly downloads | 0 |
| License | GPL-3.0-or-later |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 57.4 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | hbybyyang |
| Maintainers | hbybyyang |

## Links

- npm: https://www.npmjs.com/package/@lsby/trie-tree
- Repository: https://github.com/lsby/ts-trie-tree
- Homepage: https://github.com/lsby/ts-trie-tree#readme
- Issues: https://github.com/lsby/ts-trie-tree/issues
- npm.io page: https://npm.io/package/@lsby/trie-tree

## Recent versions

- 0.0.7 (latest) — 2026-01-07
- 0.0.6 — 2022-12-24
- 0.0.5 — 2022-11-08

## README

# trie-tree

一个 ts 实现的字典树.

## 使用

```
npm i @lsby/trie-tree
```

```typescript
import { 创建字典树, 插入字典树, 查询字典树 } from '@lsby/trie-tree'

var obj = 创建字典树()
插入字典树(obj, 'ni')
插入字典树(obj, 'ni1')
插入字典树(obj, 'ni2')
插入字典树(obj, 'ni3')
插入字典树(obj, 'ni45')
var c = 查询字典树(obj, 'ni') // ['ni1', 'ni2', 'ni3', 'ni45']
```

```typescript
import { 创建字典树, 插入字典树, 查询字典树 } from '@lsby/trie-tree'

var obj = 创建字典树()
插入字典树(obj, 'n')
插入字典树(obj, 'ni')
插入字典树(obj, 'nih')
插入字典树(obj, 'niha')
插入字典树(obj, 'nihao')
var c = 查询字典树(obj, 'ni') // ['ni', 'nih', 'niha', 'nihao']
```

---
_Source: https://npm.io/package/@lsby/trie-tree · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
