538-polls
TypeScript icon, indicating that this package has built-in type declarations

0.1.0 • Public • Published

538-polls

This is a small esm library to get polling data from 538. Currently it copies the api structure and only changes types for convenience (e.g. parsing dates from date strings)

Usage

import { fetchPolls } from "538-polls"

let polls = await fetchPolls("senate", 2022, "nevada")
let avg = await fetchPollingAverage("senate", 2022, "nevada")

Poll Types:

type cycle entity
approval
favorability
institution
person
generic-ballot
(always dem vs rep)
governor
house
senate
state
governor-recall state
president-general
president-primary-d
president-primary-r
state
"national"

Readme

Keywords

Package Sidebar

Install

npm i 538-polls

Weekly Downloads

1

Version

0.1.0

License

MIT

Unpacked Size

20.9 kB

Total Files

18

Last publish

Collaborators

  • mola19