@scrabble-solver/wiktionary
v2.4.6
Published
Scrabble Solver 2 - Wiktionary
Downloads
4
Readme
@scrabble-solver/wiktionary
Fetches WordDefinition of a given word in a given language from Wiktionary. It supports all 174 languages.
Usage
import { getWordDefinition } from '@scrabble-solver/wiktionary';
async function main() {
const { definitions, isAllowed, word } = await getWordDefinition('en', 'feline');
console.log(`"${word}" - ${isAllowed ? '👍' : '👎'}`); // "feline" - 👍
console.log(JSON.stringify(definitions, null, 2)); // ["Of or pertaining to cats.","catlike (resembling a cat)"]
}