@scrabble-solver/wiktionary
TypeScript icon, indicating that this package has built-in type declarations

2.4.6 • Public • Published

@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)"]
}

Readme

Keywords

none

Package Sidebar

Install

npm i @scrabble-solver/wiktionary

Weekly Downloads

0

Version

2.4.6

License

CC-BY-NC-ND-4.0

Unpacked Size

162 kB

Total Files

45

Last publish

Collaborators

  • kamilmielnik