0.0.32 • Published 2 years ago

electoral-votes v0.0.32

Weekly downloads
1
License
GPL-3.0
Repository
github
Last release
2 years ago

electoral-votes

A node.js module for retrieving a state's electoral votes for a given year.

Installation

npm install electoral-votes

Usage

const ev = require('electoral-votes');
ev();

Returns an array of objects for all states and all years.

API

.byYear(year)

year integer

const ev = require('electoral-votes');
ev.byYear(1788);

Returns a an array of objects representing each state with electoral votes for the year specified.

.states(state)

state string | array of strings

const ev = require('electoral-votes');
ev.byState(['Alabama', 'District of Columbia', 'New York']);

Returns an object or an array of objects for each state specified.

0.0.31

2 years ago

0.0.3

2 years ago

0.0.32

2 years ago

0.0.23

6 years ago

0.0.22

6 years ago

0.0.21

7 years ago

0.0.2

7 years ago

0.0.1

7 years ago