
Security News
Django Joins curl in Pushing Back on AI Slop Security Reports
Django has updated its security policies to reject AI-generated vulnerability reports that include fabricated or unverifiable content.
@types/trie-prefix-tree
Advanced tools
TypeScript definitions for trie-prefix-tree
npm install --save @types/trie-prefix-tree
This package contains type definitions for trie-prefix-tree (https://github.com/lyndseybrowning/trie-prefix#readme).
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/trie-prefix-tree.
type RawTree =
& { "$"?: 1 | undefined }
& { [s in Exclude<string, "$">]?: RawTree | undefined };
declare function Trie(
strings: string[],
): {
/**
* Get a string representation of the trie
*/
dump(spacer?: number): string;
/**
* Get the generated raw trie object
*/
tree(): RawTree;
/**
* Add a new word to the trie
*/
addWord(word: string): ReturnType<typeof Trie>;
/**
* Remove an existing word from the trie
*/
removeWord(word: string): ReturnType<typeof Trie>;
/**
* Check a prefix is valid
* @returns Boolean
*/
isPrefix(word: string): boolean;
/**
* Count the number of words with the given prefixSearch
* @returns Number
*/
countPrefix(word: string): number;
/**
* Get a list of all words in the trie with the given prefix
* @returns Array
*/
getPrefix(word: string, sort?: boolean): string[];
/**
* Get a random word in the trie with the given prefix
* @returns Array
*/
getRandomWordWithPrefix(prefix: string): string;
/**
* Get all words in the trie
* @returns Array
*/
getWords(sorted?: boolean): string[];
/**
* Check the existence of a word in the trie
* @returns Boolean
*/
hasWord(word: string): boolean;
/**
* Get a list of valid anagrams that can be made from the given letters
* @returns Array
*/
getAnagrams(word: string): string[];
/**
* Get a list of all sub-anagrams that can be made from the given letters
* @returns Array
*/
getSubAnagrams(word: string): string[];
};
export = Trie;
These definitions were written by James Lismore.
FAQs
TypeScript definitions for trie-prefix-tree
The npm package @types/trie-prefix-tree receives a total of 847 weekly downloads. As such, @types/trie-prefix-tree popularity was classified as not popular.
We found that @types/trie-prefix-tree demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Django has updated its security policies to reject AI-generated vulnerability reports that include fabricated or unverifiable content.
Security News
ECMAScript 2025 introduces Iterator Helpers, Set methods, JSON modules, and more in its latest spec update approved by Ecma in June 2025.
Security News
A new Node.js homepage button linking to paid support for EOL versions has sparked a heated discussion among contributors and the wider community.