{"id":16924068,"url":"https://github.com/davidchase/pull-dom-events","last_synced_at":"2025-03-21T00:40:22.894Z","repository":{"id":65371450,"uuid":"62328848","full_name":"davidchase/pull-dom-events","owner":"davidchase","description":"Simple pull-stream for DOM events","archived":false,"fork":false,"pushed_at":"2016-07-07T04:50:43.000Z","size":14,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-02-26T18:06:33.563Z","etag":null,"topics":["dom","dom-events","events","pull-stream"],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/davidchase.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":"2016-06-30T17:10:17.000Z","updated_at":"2018-03-02T18:01:35.000Z","dependencies_parsed_at":"2023-01-19T22:35:14.595Z","dependency_job_id":null,"html_url":"https://github.com/davidchase/pull-dom-events","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/davidchase%2Fpull-dom-events","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/davidchase%2Fpull-dom-events/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/davidchase%2Fpull-dom-events/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/davidchase%2Fpull-dom-events/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/davidchase","download_url":"https://codeload.github.com/davidchase/pull-dom-events/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244717365,"owners_count":20498284,"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":["dom","dom-events","events","pull-stream"],"created_at":"2024-10-13T20:03:07.052Z","updated_at":"2025-03-21T00:40:22.873Z","avatar_url":"https://github.com/davidchase.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# pull-dom-events\nSimple [pull-stream](https://github.com/pull-stream/pull-stream) for DOM events\n\n![](https://nodei.co/npm/pull-dom-events.png)\n\n![](https://img.shields.io/npm/v/pull-dom-events.svg?style=flat-square) ![](https://img.shields.io/npm/l/pull-dom-events.svg?style=flat-square)\n### Install\n\n`npm install --save pull-dom-events`\n\n### Usage\n\n\n\n```js\nconst pull = require('pull-stream')\nconst {pullEvent, click} = require('pull-dom-events')\nconst {log, filter} = pull\n\npull(\n    pullEvent('click', document),\n    filter(event =\u003e event.target.matches(...)),\n    log()\n)\n\n// or shorthand method\n\npull(\n    click(document),\n    filter(event =\u003e event.target.matches(...)),\n    log()\n)\n\n```\n\n#### `pullEvent(eventType, element, capture?)`\n\n`pullEvent` takes a `eventType` such `click, mouseover, keydown, etc` an element such as `document` and an optional `capture` boolean.\n\n#### `eventType(element, capture?)`\n`eventType` takes a element to bind to and an option `capture` boolean\n\nCurrently supporting the following event-types:\n\n`click, dblclick, mousedown, mouseup, mousemove, mouseover, mouseenter, mouseout, mouseleave, keydown, keypress, keyup, load, unload `\n\n```js\n const source = click(document)\n```\n\n\n\n### Todo\n- [ ] more tests\n- [ ] more shorthand event types\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdavidchase%2Fpull-dom-events","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdavidchase%2Fpull-dom-events","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdavidchase%2Fpull-dom-events/lists"}