1.0.6 • Published 6 years ago

nodetimeline v1.0.6

Weekly downloads
3
License
MIT
Repository
github
Last release
6 years ago

Node Timeline

npm version downloads per month downloads all time

Node Timeline is a historically related node module full of random 21st century data that you may find useful. (2000 - Present)

Installation

This is a Node.js module available through the npm registry.

Before installing nodetimeline, download and install Node.js

Installation is accomplished using the npm install command:

$ npm i nodetimeline --save

Usage

First, of all make sure to include nodetimeline in your JavaScript File.

var t = require("nodetimeline");

Node Timeline is a very simple package to use. Every function has a year input, and returns either a string or number.

Functions

Politics (United States)

  • firstLady(year)
  • president(year)

let president = t.president(2005);
console.log(president);

// "George W. Bush"

// For a president's name between elections, add 0.1 or 0.2 to the election year

let president = t.president(2017.1);
console.log(president);

// "Barack Obama"

let president = t.president(2017.2);
console.log(president);

// "Donald Trump"

// Requesting a first lady's name also works the same way

let firstLady = t.firstLady(2018);

// "Melania Trump"

Sports

  • nbaChampion(year)
  • nflChampion(year)
  • nhlChampion(year)
  • mlbChampion(year)

let nbaChampion = t.nbaChampion(2017);
console.log(nbaChampion);

// "Golden State Warriors"

let nflChampion = t.nflChampion(2017);
console.log(nflChampion);

// "The New England Patriots"

let nhlChampion = t.nhlChampion(2017);
console.log(nhlChampion);

// "The Pittsburgh Penguins"

let mlbChampion = t.mlbChampion(2017);
console.log(mlbChampion);

// "The Houston Astros"
1.0.6

6 years ago

1.0.5

6 years ago

1.0.4

6 years ago

1.0.3

6 years ago

1.0.2

6 years ago

1.0.1

6 years ago

1.0.0

6 years ago