Coder Social home page Coder Social logo

fennecdata / tech-quote-of-the-week Goto Github PK

View Code? Open in Web Editor NEW

This project forked from fullstackbulletin/tech-quote-of-the-week

0.0 1.0 0.0 55 KB

A set of tech quotes that might be enjoyed by the fullstack developer

License: MIT License

JavaScript 100.00%

tech-quote-of-the-week's Introduction

tech-quote-of-the-week

npm version CircleCI codecov

A library to get every week a new tech quote that might be enjoyed by the fullstack developer.

Install

With NPM:

npm install tech-quote-of-the-week

with Yarn:

yarn add tech-quote-of-the-week

Usage

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"
}

Options

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)());

Contributing

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.

License

Licensed under MIT License. © Luciano Mammino.

tech-quote-of-the-week's People

Contributors

lmammino avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.