Package Exports
- dictionatrie
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 (dictionatrie) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
dictionatrie
Dictionary trie
Usage
// Initialization
const createDictionary = require("dictionatrie");
const dictionary = createDictionary(); // defaults to a huge list of English words
const customDictionary = createDictionary([ "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); // trueDependencies
word-list by sindresorhus: Used for the default word list.