word-master
v1.0.0
Published
A cool word package
Maintainers
Readme
WORD MASTER
this plugin has 2 simple functions that can be useful for you!
- searchDictionary(word)
Searches the dictionary and gives the details of the word (https://dictionaryapi.dev/):
const api = require("word-master")
(async() => {
console.log(await api.searchDictionary("Hello"))
})and the output will be:
[
{
"word": "hello",
"phonetic": "həˈləʊ",
"phonetics": [
{
"text": "həˈləʊ",
"audio": "//ssl.gstatic.com/dictionary/static/sounds/20200429/hello--_gb_1.mp3"
},
{
"text": "hɛˈləʊ"
}
],
"origin": "early 19th century: variant of earlier hollo ; related to holla.",
"meanings": [
{
"partOfSpeech": "exclamation",
"definitions": [
{
"definition": "used as a greeting or to begin a phone conversation.",
"example": "hello there, Katie!",
"synonyms": [],
"antonyms": []
}
]
},
{
"partOfSpeech": "noun",
"definitions": [
{
"definition": "an utterance of ‘hello’; a greeting.",
"example": "she was getting polite nods and hellos from people",
"synonyms": [],
"antonyms": []
}
]
},
{
"partOfSpeech": "verb",
"definitions": [
{
"definition": "say or shout ‘hello’.",
"example": "I pressed the phone button and helloed",
"synonyms": [],
"antonyms": []
}
]
}
]
}
]- randomWord()
Gets a random word from a 1000 words library
const api = require("word-master")
console.log(api.randomWord())The output might be:
"solace"Peace!
