thesaurus-js
TypeScript icon, indicating that this package has built-in type declarations

1.0.5 • Public • Published

Thesaurus is a multi-language library for client-side frontends that look up synonyms from different online dictionaries. These are the currently available dictionaries and languages.

Getting started

Installation

npm install thesaurus-js

Usage

Parameters

  • word: main word to look up synonyms
  • language: language code to search for ('fr', 'pt', etc.) if none is present, the default value is 'en'.
  • dictionaries: dictionaries to search for (currently available: 'thesaurus', 'wordreference' and 'reverso'), if none is present it will default to 'multi' and search all dictionaries.

Example

import { thesaurus } from 'thesaurus-js';

await thesaurus('house', 'en', ['reverso', 'wordreference']);
// => [ word: 'house', language: 'en', dictionary: 'reverso', synonyms: [ 'home', 'residence', ... ] ]

Package Sidebar

Install

npm i thesaurus-js

Weekly Downloads

29

Version

1.0.5

License

MIT

Unpacked Size

14.4 kB

Total Files

8

Last publish

Collaborators

  • constanzaccg