Caution
This repo has been archived in favour of FullStackBulletin/tech-quotes
A library to get every week a new tech quote that might be enjoyed by the fullstack developer.
With NPM:
npm install tech-quote-of-the-week
with Yarn:
yarn add tech-quote-of-the-week
ES5 example:
var techQuoteOfTheWeek = require('tech-quote-of-the-week').default;
console.log(techQuoteOfTheWeek()()); // changes every week based on current time
// You can pass a custom week number (from 1 to 53) to get a different quote
console.log(techQuoteOfTheWeek()(23));
ES2015 example:
import { techQuoteOfTheWeek } from 'tech-quote-of-the-week';
console.log(techQuoteOfTheWeek()()); // changes every week based on current time
// You can pass a custom week number (from 1 to 53) to get a different quote
console.log(techQuoteOfTheWeek()(23));
Sample output:
{
"id": "6",
"text": "One machine can do the work of fifty ordinary men. No machine can do the work of one extraordinary man",
"author": "Elbert Hubbard",
"authorDescription": "Author",
"authorUrl": "https://en.wikipedia.org/wiki/Elbert_Hubbard"
}
You can pass a custom array of quotes in the initialization function in case you want to use the same algorithm in a custom set of quotes.
E.g.
import { techQuoteOfTheWeek } from 'tech-quote-of-the-week';
const quotes = [
{"id":"1","text":"Technology is anything that wasn’t around when you were born","author":"Alan Kay","authorDescription":"Computer Scientist", "authorUrl":"https://en.wikipedia.org/wiki/Alan_Kay"},
{"id":"2","text":"Any sufficiently advanced technology is equivalent to magic","author":"Arthur C. Clarke","authorDescription":"Author","authorUrl":"https://en.wikipedia.org/wiki/Arthur_C._Clarke"}
];
console.log(techQuoteOfTheWeek(quotes)());
Everyone is very welcome to contribute to this project. You can contribute just by submitting bugs or suggesting improvements by opening an issue on GitHub.
Licensed under MIT License. © Luciano Mammino.