{"id":28509824,"url":"https://github.com/choojs/nanobounce","last_synced_at":"2025-07-03T01:31:23.476Z","repository":{"id":48800349,"uuid":"86934164","full_name":"choojs/nanobounce","owner":"choojs","description":"Smol debounce package","archived":false,"fork":false,"pushed_at":"2021-07-11T15:07:23.000Z","size":7,"stargazers_count":20,"open_issues_count":0,"forks_count":7,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-06-18T05:43:48.965Z","etag":null,"topics":[],"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/choojs.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":"2017-04-01T18:34:46.000Z","updated_at":"2024-11-30T13:05:26.000Z","dependencies_parsed_at":"2022-09-17T10:30:17.302Z","dependency_job_id":null,"html_url":"https://github.com/choojs/nanobounce","commit_stats":null,"previous_names":["yoshuawuyts/microbounce","yoshuawuyts/nanobounce"],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/choojs/nanobounce","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/choojs%2Fnanobounce","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/choojs%2Fnanobounce/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/choojs%2Fnanobounce/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/choojs%2Fnanobounce/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/choojs","download_url":"https://codeload.github.com/choojs/nanobounce/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/choojs%2Fnanobounce/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":263243634,"owners_count":23436341,"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":"2025-06-08T22:37:27.907Z","updated_at":"2025-07-03T01:31:23.458Z","avatar_url":"https://github.com/choojs.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# nanobounce [![stability][0]][1]\n[![npm version][2]][3] [![build status][4]][5]\n[![downloads][8]][9] [![js-standard-style][10]][11]\n\nSmol debounce package.\n\n## Usage\n```js\nvar Nanobounce = require('nanobounce')\nvar html = require('bel')\n\nvar nanobounce = Nanobounce()\nhtml`\n  \u003cinput onkeydown=${onkeydown}\u003eclick me\u003c/button\u003e\n`\nfunction onkeydown (e) {\n  var value = e.target.value\n  nanobounce(function () {\n    console.log('called at the start of a new frame', value)\n  })\n}\n```\n\n## Why?\nBecause most debounce functions don't work well when doing DOM diffing. This\npackage is specifically made to work well with DOM diffing.\n\n## API\n### `nanobounce = Nanobounce([timeout])`\nCreate a new instance. Timeout defaults to `256ms`.\n\n### `nanobounce(callback)`\nDebounce a callback for the duration of the timeout. The last callback wins if\ncalled multiple times in a row.\n\n## License\n[MIT](https://tldrlegal.com/license/mit-license)\n\n[0]: https://img.shields.io/badge/stability-experimental-orange.svg?style=flat-square\n[1]: https://nodejs.org/api/documentation.html#documentation_stability_index\n[2]: https://img.shields.io/npm/v/nanobounce.svg?style=flat-square\n[3]: https://npmjs.org/package/nanobounce\n[4]: https://img.shields.io/travis/yoshuawuyts/nanobounce/master.svg?style=flat-square\n[5]: https://travis-ci.org/yoshuawuyts/nanobounce\n[6]: https://img.shields.io/codecov/c/github/yoshuawuyts/nanobounce/master.svg?style=flat-square\n[7]: https://codecov.io/github/yoshuawuyts/nanobounce\n[8]: http://img.shields.io/npm/dm/nanobounce.svg?style=flat-square\n[9]: https://npmjs.org/package/nanobounce\n[10]: https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat-square\n[11]: https://github.com/feross/standard\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchoojs%2Fnanobounce","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fchoojs%2Fnanobounce","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchoojs%2Fnanobounce/lists"}