{"id":18096210,"url":"https://github.com/bredele/sewer","last_synced_at":"2025-10-13T14:32:44.322Z","repository":{"id":13327810,"uuid":"16014694","full_name":"bredele/sewer","owner":"bredele","description":"Cross browser and device event handler with delegation, chaining and filtering engines","archived":false,"fork":false,"pushed_at":"2014-04-17T17:14:27.000Z","size":332,"stargazers_count":3,"open_issues_count":5,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-09-21T08:23:56.162Z","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":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/bredele.png","metadata":{"files":{"readme":"Readme.md","changelog":"History.md","contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2014-01-17T23:25:23.000Z","updated_at":"2014-05-14T18:19:33.000Z","dependencies_parsed_at":"2022-09-26T19:10:33.390Z","dependency_job_id":null,"html_url":"https://github.com/bredele/sewer","commit_stats":null,"previous_names":["bredele/event"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/bredele/sewer","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bredele%2Fsewer","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bredele%2Fsewer/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bredele%2Fsewer/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bredele%2Fsewer/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bredele","download_url":"https://codeload.github.com/bredele/sewer/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bredele%2Fsewer/sbom","scorecard":{"id":251887,"data":{"date":"2025-08-11","repo":{"name":"github.com/bredele/sewer","commit":"c1fad5b43194c70f45bde3888d109e495213d5e9"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":2.6,"checks":[{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Dangerous-Workflow","score":-1,"reason":"no workflows found","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Token-Permissions","score":-1,"reason":"No tokens found","details":null,"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Code-Review","score":0,"reason":"Found 0/30 approved changesets -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Pinned-Dependencies","score":-1,"reason":"no dependencies found","details":null,"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"SAST","score":0,"reason":"no SAST tool detected","details":["Warn: no pull requests merged into dev branch"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"Vulnerabilities","score":10,"reason":"0 existing vulnerabilities detected","details":null,"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"License","score":0,"reason":"license file not detected","details":["Warn: project does not have a license file"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'master'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}}]},"last_synced_at":"2025-08-17T08:40:05.329Z","repository_id":13327810,"created_at":"2025-08-17T08:40:05.329Z","updated_at":"2025-08-17T08:40:05.329Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279015738,"owners_count":26085748,"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","status":"online","status_checked_at":"2025-10-13T02:00:06.723Z","response_time":61,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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-10-31T19:13:01.120Z","updated_at":"2025-10-13T14:32:44.303Z","avatar_url":"https://github.com/bredele.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Sewer\n\n  Sewer will help you dealing with all the crap needed to handle dom events.\n\n  Sewer is cross browser and provides some cool features such as:\n   - cross browser target element\n   - automatic touch mapping\n   - delegation\n   - chaining\n   - filtering\n\n## Installation\n\nwith [component](http://component.io):\n\n    $ component install bredele/sewer\n\nwith [nodejs](http://nodejs.org/):\n\n    $ npm install sewer\n\nSewer is small and do one thing, listening dom events. It encourages composition and is already used in some\nprojects such as **[brick](http://github.com/bredele/brick)** or **[wall](http://github.com/bredele/wall)**. \n\n## Usage\n\n```js\nvar ev = require('sewer');\n\nev.bind(document.body, 'click', function(target, event) {\n  // do something\n});\n```\n\n  See [API](#api) for more details.\n\n### Delegation \n\n Delegate events with query selection. In the example above, the callback\n is executed only when a `button` with the className `clickable` is\n clicked.\n\n```js\nev.bind(document.body, 'click button.clickable', function() {\n  //do something only when buttons with the \n  //class clickable are clicked\n});\n```\n\n### Touch events\n\n  Touch events are automatically mapped with desktop/mouse events. It is great because\n  your implementation doesn't depend on the device and at the end you'll have one code that works everywhere.\n\n```js\nev.bind(el, 'click', function(target, event) {\n  // do something on touch end\n});\n```\n\n  In this example the callback is executed on `touchend` if you are on a mobile device\n  and on `click` otherwise.\n\n```\nclick =\u003e touchend\nmouseup =\u003e touchend\nmousedown =\u003e touchstart\nmousemove =\u003e touchmove\n```\n\n### Chaining\n\n  A code which depends on the event is hard to reuse or maintain. A good practice\n  is to dissociate the event manipulation from the real logic:\n\n```js\nev.bind(el, 'click', fn1, fn2);\n\nfunction fn1(target, e) {\n  e.preventDefault();\n  return target.innerHTML;\n}\n\nfunction fn2(str) {\n  //do something on target innerHTML\n}\n```\n\n### Filtering\n\n  Filter events with key code. In the example above, the callback is executed\n  only when `enter` is pressed.\n\n```js\nvar input = document.querySelector('input');\n\nev.bind(input, 'keypress \u003e 13', function() {\n  //do something only on enter\n});\n```\n\n## API\n\n### .bind(el, str, callback, capture)\n\n  Add an event listener (alias `attach`).\n\n```js\nev.bind(document.body, 'click', function(target, ev) {\n  //do something\n});\n```\nThe first argument of the callback is the element (cross browser target) that trigerred the event.\n\n\n`bind` returns an array (topic, callback, capture) in case you want to remove the listener.\n\n\n### .unbind(el, topic, callback, capture)\n\n Remove an event listener (alias `detach`).\n\n```js\nev.unbind(document.body,'click', fn);\n```\n\n## License\n\nThe MIT License (MIT)\n\nCopyright (c) 2014 Olivier Wietrich \u003colivier.wietrich@gmail.com\u003e\n\nPermission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the \"Software\"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbredele%2Fsewer","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbredele%2Fsewer","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbredele%2Fsewer/lists"}