JSPM

@smikhalevski/trie

1.0.1
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 1428
  • Score
    100M100P100Q114960F
  • License MIT

The compact trie data structure.

Package Exports

  • @smikhalevski/trie

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (@smikhalevski/trie) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

trie build

The compact trie data structure.

npm install --save-prod @smikhalevski/trie

Usage

⚠️ API documentation is available here.

import {TrieMap} from '@smikhalevski/trie';

const trieMap = new TrieMap();

trieMap.set('foo', 123);

trieMap.get('foo'); // → 123

trieMap.search('aaafoobbb', 3);
// → {key: 'foo', value: 123, …}

Performance

Clone this repo and use npm ci && npm run perf to run the performance testsuite.

Search performance

Search performance chart