{"id":20254692,"url":"https://github.com/dsys/gallup","last_synced_at":"2025-10-29T15:10:21.883Z","repository":{"id":57244089,"uuid":"45211919","full_name":"dsys/gallup","owner":"dsys","description":":bar_chart: Poll any resource using ES6 Promises and streams","archived":false,"fork":false,"pushed_at":"2015-10-31T02:16:33.000Z","size":352,"stargazers_count":6,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-11T00:03:46.423Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/dsys.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-10-29T21:34:26.000Z","updated_at":"2020-12-10T12:45:05.000Z","dependencies_parsed_at":"2022-09-01T04:30:23.882Z","dependency_job_id":null,"html_url":"https://github.com/dsys/gallup","commit_stats":null,"previous_names":["pavlovml/gallup"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dsys%2Fgallup","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dsys%2Fgallup/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dsys%2Fgallup/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dsys%2Fgallup/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dsys","download_url":"https://codeload.github.com/dsys/gallup/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248317705,"owners_count":21083528,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-14T10:34:26.135Z","updated_at":"2025-10-29T15:10:21.785Z","avatar_url":"https://github.com/dsys.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cimg src=\"https://raw.githubusercontent.com/pavlovml/gallup/master/resources/logo.png\" alt=\"gallup\" width=\"303\" /\u003e\n\n[![TravisCI shield](https://img.shields.io/travis/pavlovml/gallup.svg)](https://travis-ci.org/pavlovml/gallup) [![npm shield](https://img.shields.io/npm/v/gallup.svg)](https://www.npmjs.com/package/gallup) [![js-standard-style](https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat)](http://standardjs.com/)\n\nPoll any resource using ES6 Promises and streams.\n\n## Installation\n\n    $ npm install gallup --save\n\n## Usage\n\n```javascript\nimport Gallup from 'gallup'\n\n// You construct a poller by providing a poll callback as the first argument\n// and an optional options object as the second. The poll function may return a\n// normal value or an ES6 Promise to be evaluated.\n\nvar poller = new Gallup(() =\u003e {\n    return Promise.resolve({ stub: 'data' })\n}, 5000) // poll every 5 seconds (default: 1 second)\n\n// Pollers are stopped by default. Starting them begins polling immediately.\npoller.start()\n\n// Pollers are instances of EventEmitter. When promises resolve, their values\n// are emitted via 'data' events. Errors are emitted via 'error' events. If the\n// previous poll is taking a long time to resolve, another poll will not be\n// initiated until the previous one completes.\n\npoller.on('data', data =\u003e {\n  console.log(data)\n})\n\npoller.on('error', err =\u003e {\n  console.error(err)\n})\n\n// You can also stop and restart polling.\npoller.stop()\npoller.start()\n```\n\n## Development\n\nGallup uses [JavaScript Standard Style](https://github.com/feross/standard), [Babel](https://babeljs.io/) for ES6+ support, and [Jest](http://facebook.github.io/jest/) for testing.\n\n    $ git clone git@github.com:pavlovml/gallup.git\n    $ npm test\n\nTo run the tests on file changes:\n\n    $ npm test -- --watch\n\n## License\n\n[BSD 3-Clause](https://github.com/pavlovml/gallup/blob/master/LICENSE)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdsys%2Fgallup","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdsys%2Fgallup","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdsys%2Fgallup/lists"}