https://github.com/codetheweb/literature-clock
Returns a random quote containing the passed time.
https://github.com/codetheweb/literature-clock
Last synced: 4 months ago
JSON representation
Returns a random quote containing the passed time.
- Host: GitHub
- URL: https://github.com/codetheweb/literature-clock
- Owner: codetheweb
- License: mit
- Created: 2020-02-11T01:39:49.000Z (about 5 years ago)
- Default Branch: master
- Last Pushed: 2022-02-13T01:02:27.000Z (about 3 years ago)
- Last Synced: 2024-12-27T16:34:48.935Z (4 months ago)
- Language: JavaScript
- Size: 666 KB
- Stars: 7
- Watchers: 3
- Forks: 4
- Open Issues: 8
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# literature-clock
Returns a random quote containing the passed time.
## Installation
`yarn add literature-clock` or `npm install literature-clock`.
## Usage
Super simple. This:
```javascript
const getQuote = require('literature-clock');const now = new Date();
console.log(getQuote(now));
```will result in something like this:
```javascript
{
time: '8.44!',
book: 'Around the World in Eighty Days',
author: 'Jules Verne',
prefix: `The clock's pendulum beat every second with mathematical regularity, and each player could count every sixtieth of a minute as it struck his ear."`,
suffix: '" said John Sullivan, in a voice that betrayed his emotion.Only one minute more and the wager would be won.'
}
```## Credits
Inspired by the [webapp](https://github.com/JohannesNE/literature-clock) (which in turn was inspired by the [Kindle project](https://www.instructables.com/id/Literary-Clock-Made-From-E-reader/)).