1.1.0 β’ Published 3 years ago
ranwords v1.1.0
Ranwords
Easily generate random words with their meaning and pronunciation.
ππΎββοΈ Get started
π» Install the package
npm install ranwords
π Usage
- TypeScript
import { randomWordAll, randomWordMeaning, randomWordPronunciation } from "ranwords";
// returns json formatted data
randomWordAll().then(console.log);
// only returns a word + meaning
randomWordMeaning().then(console.log);
// only returns a word + pronunciation
randomWordPronunciation().then(console.log);
- JavaScript
const { randomWordAll, randomWordMeaning, randomWordPronunciation } = require("ranwords");
// returns json formatted data
randomWordAll().then(console.log);
// only returns a word + meaning
randomWordMeaning().then(console.log);
// only returns a word + pronunciation
randomWordPronunciation().then(console.log);
π Examples
- randomWordAll();
{
word: 'Utile',
definition: 'Profitable; useful',
pronunciation: 'Utile'
}
- randomWordMeaning();
Yager | Nineteenth-century rifle
- randomWordPronunciation();
Γolienne | Eoliene
1.1.0
3 years ago