{"_id":"538-polls","name":"538-polls","dist-tags":{"latest":"0.1.0"},"versions":{"0.1.0":{"name":"538-polls","version":"0.1.0","description":"Fetch polling data from 538","main":"dist/index.js","scripts":{"dev":"tsc -w","build":"tsc -b"},"keywords":["election","poll"],"author":{"name":"mola19"},"repository":{"type":"git","url":"git+https://github.com/mola19/538-polls.git"},"license":"MIT","devDependencies":{"@types/node":"^20.11.20","typescript":"^5.3.3"},"type":"module","types":"./dist/index.d.ts","gitHead":"31a437060c0f256fd5d0761e627b72a540fff970","bugs":{"url":"https://github.com/mola19/538-polls/issues"},"homepage":"https://github.com/mola19/538-polls#readme","_id":"538-polls@0.1.0","_nodeVersion":"20.2.0","_npmVersion":"9.6.6","dist":{"integrity":"sha512-P8DZLuEf+N6EyboX9GCsN82j6BtGGCGcarja+snOjC5pEmRF5HfEBFhXfXVLKEOfVH5okb9rJ4w+QbC8B2y7Xw==","shasum":"5c73094ac3200f188fafb836ad1fbb934c9a0796","tarball":"https://registry.npmjs.org/538-polls/-/538-polls-0.1.0.tgz","fileCount":18,"unpackedSize":20893,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDGzAaPKXmc0UbQ2DCc9LVrqqHONsbrLK0eKbFGPDyixgIgAzqQBVFCQ047N6eU/D2lBJfLI2raTAbe6g0A4rp3k3s="}]},"_npmUser":{"name":"mola19","email":"Mola9041@gmail.com"},"directories":{},"maintainers":[{"name":"mola19","email":"Mola9041@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/538-polls_0.1.0_1709592070811_0.4909981577103555"},"_hasShrinkwrap":false}},"time":{"created":"2024-03-04T22:41:10.811Z","0.1.0":"2024-03-04T22:41:10.988Z","modified":"2024-03-04T22:41:11.745Z"},"maintainers":[{"name":"mola19","email":"Mola9041@gmail.com"}],"description":"Fetch polling data from 538","homepage":"https://github.com/mola19/538-polls#readme","keywords":["election","poll"],"repository":{"type":"git","url":"git+https://github.com/mola19/538-polls.git"},"author":{"name":"mola19"},"bugs":{"url":"https://github.com/mola19/538-polls/issues"},"license":"MIT","readme":"# 538-polls\r\nThis is a small esm library to get polling data from [538](https://projects.fivethirtyeight.com/polls/).\r\nCurrently it copies the api structure and only changes types for convenience (e.g. parsing dates from date strings)\r\n\r\n## Usage\r\n\r\n```js\r\nimport { fetchPolls } from \"538-polls\"\r\n\r\nlet polls = await fetchPolls(\"senate\", 2022, \"nevada\")\r\nlet avg = await fetchPollingAverage(\"senate\", 2022, \"nevada\")\r\n```\r\n\r\n## Poll Types:\r\n  \r\n| type                                                            | cycle | entity                   |\r\n| --------------------------------------------------------------- | ----- | ------------------------ |\r\n| approval<br>favorability                                        | ❌     | institution<br>person    |\r\n| generic-ballot                                                  | ✔     | ❌<br>(always dem vs rep) |\r\n| governor<br>house<br>senate                                     | ✔     | state                    |\r\n| governor-recall                                                 | ❌     | state                    |\r\n| president-general<br>president-primary-d<br>president-primary-r | ✔     | state<br>\"national\"      |\r\n","readmeFilename":"readme.md"}