today-idiom
Version:
A Node.js package that picks an English idiom for today
76 lines (52 loc) • 1.37 kB
Markdown
:pushpin: A Node.js package that picks an English idiom for today
- [Installation](
- [Methods](
- [Examples](
- [Author](
- [License](
Using npm:
```bash
$ npm install today-idiom
```
Using yarn:
```bash
$ yarn add today-idiom
```
```js
const todayIdiom = require('today-idiom');
```
```js
import todayIdiom from 'today-idiom';
```
```js
(async () => {
try {
const idiom = await todayIdiom.getIdiom();
console.log(idiom);
/* {
idiom: 'a war of words',
meaning: "If you're in a war of words with someone, you're having a long argument or dispute with them.",
examples: [
'The leaders of the two main political parties are in a war of words over the issue of gun ownership. They debate the topic whenever they see each other.',
'The war of words between community leaders and church leaders has been dominating the newspaper headlines lately.'
]
} */
} catch (error) {
console.log(error);
}
})();
```
[](https://github.com/KutieKat)
[](LICENSE)