$ npm i quote-lib --save
$ const quotes=require('quote-lib');
$ const quote=quotes.getRandom();
$ console.log(quote);
//result
{
"category": [
"motivational",
"entrepreneur"
],
"quote": "Successful entrepreneurs are givers and not takers of positive energy.",
"author": "Anonymous"
}
$ const quote=quotes.getByCategory('programming');
$ console.log(quote);
//result
{
category: [ 'programming' ],
quote: 'The most disastrous thing that you can ever learn is your first programming language.',
author: 'Alan Kay'
}
$ const quote=quotes.getByAuthor('Mahatma Gandhi');
$ console.log(quote);
//result
{
category: [ 'education', 'motivational' ],
quote: 'Live as if you were to die tomorrow. Learn as if you were to live forever.',
author: 'Mahatma Gandhi'
}
motivational entrepreneur education programming