Thought of the day
Provides random thoughts/quotes and corresponding authors.
Implementation of this package in chrome extension - https://github.com/nirajpandkar/thoughts-chrome-extension
Positive thought is a key ingredient of leading a happy and fulfilling life. All the worldwide leaders and speakers have always given us inspiring and motivational thoughts. I am thankful to all the known and unknown people for their thoughts in this library.
Install
$ npm install --save thoughts
Usage
const lib = ;var random = lib; // gives random object from any categoryvar anotherRandom = lib; //gives random object from specified categoryvar particular = lib; //gives particular object from specified category console;//=>If you fully accept the worst that can ever happen in your journey, fear won’t ever be an obstacle in starting-up. console;//=>Kunal Shah console;//=>Be with people who know your VALUE, not your PRICE. console;//=>Anonymous console;//=>I don't plan on being famous, but I do plan on living the dream. console;//=>Anonymous
API
random(category)
Returns a random object from specified category.Categories listed below
Object has two properties - author
and thought
random()
If used with no parameters(no category), it returns an object from any one of the categories.
particular(category,index)
Returns a particular object from specified category. Need to refer to thoughts.json
.
Categories
- startup
- anonymous
- motivation
More categories and thoughts are going to be added. Currently finding out a way to enable users to contribute to the 'thoughts' list easily.
License
MIT © Niraj Pandkar
To do:
- Find a way to build an internal thoughts json
- Add a browser build