1.2.0 • Published 6 years ago

dictionatrie v1.2.0

Weekly downloads
3
License
ISC
Repository
github
Last release
6 years ago

dictionatrie

Build and search a minimalist dictionary trie

Usage

// Initialization
const Dictionary = require("dictionatrie");
const dictionary = new Dictionary(); // defaults to words in Yet Another Word List (YAWL)
const customDictionary = new Dictionary([ "cat", "dog", "llama" ]); // custom dictionary

// Search for complete match
var match1 = dictionary.has("uncontroversially"); // true
var match2 = customDictionary.has("llama"); // true
var match3 = dictionary.has("uncontroversiall"); // false: no complete match
var match4 = customDictionary.has("uncontroversially"); // false: no such word in custom dictionary

// Search for partial match (add a "true" flag)
var match5 = dictionary.has("uncontroversially", true); // true
var match6 = dictionary.has("uncontroversiall", true); // true
1.2.0

6 years ago

1.1.1

7 years ago

1.0.4

7 years ago

1.0.3

7 years ago

1.0.2

7 years ago

1.0.1

7 years ago

1.0.0

7 years ago