0.0.3 • Published 7 years ago
words-without-translation v0.0.3
Words Without Translation
A small node module providing over 500 words (and growing) without any direct English translation.
Installation
npm install words-without-translation
Usage
let wordsWithoutTranslation = require('words-without-translation');
let getRandomWord = wordsWithoutTranslation.getRandomWord();
console.log(getRandomWord);
/*
{ name: 'Fernweh',
meaning: 'A strong longing to be away, to go somewhere.',
language: 'German',
tags: [ 'desire', 'feeling', 'travel' ] }
*/
let getRandomWordWithLanguage = wordsWithoutTranslation.getRandomWordWithLanguage('Chinese');
console.log(getRandomWordWithLanguage);
/*
{ name: 'Xingfu',
meaning: 'A sort of happiness or contentedness felt through having everything you want in life and/or not having any looming worries. It describes a long-term feeling about one’s life situation rather than a happiness achieved through a singular outcome or situation.',
language: 'Chinese',
tags: [ 'happiness', 'life', 'positive' ] }
*/
let getRandomWordWithTag = wordsWithoutTranslation.getRandomWordWithTag('community');
console.log(getRandomWordWithTag);
/*
{ name: 'Dugnad',
meaning: 'A social activity where a group of friends or neighbors get together to perform a large task. Similar to the old practice of barn raising in North America except it can be any task, not just building a barn.',
language: 'Norwegian',
tags: [ 'community' ] }
*/
let getRandomWordWithLanguageAndTag = wordsWithoutTranslation.getRandomWordWithLanguageAndTag('Spanish', 'feeling');
console.log(getRandomWordWithLanguageAndTag);
/*
{ name: 'Empalagarse',
meaning: 'The sensation your tongue has after eating too many sweets. It the feeling you get when you need some milk to go with that chocolate cake.',
language: 'Spanish',
tags: [ 'feeling', 'body', 'food' ] }
*/
Additional methods available:
getAllWordsWithTag()
,
getAllWordsWithLanguage()
,
getAllWordsWithLanguageAndTag()
Tests
npm test
Contributing
If interested, please feel free to fork this repository and submit a pull request accordingly. They are more than welcome.😊