{"id":30380899,"url":"https://github.com/coreusa/v-debounce","last_synced_at":"2026-04-09T10:04:05.843Z","repository":{"id":37811012,"uuid":"101149752","full_name":"Coreusa/v-debounce","owner":"Coreusa","description":"Vue2 debounce directive for inputs.","archived":false,"fork":false,"pushed_at":"2022-07-06T08:07:37.000Z","size":15,"stargazers_count":13,"open_issues_count":0,"forks_count":2,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-08-19T15:19:32.298Z","etag":null,"topics":["debounce","directive","input","vue2","vue2-directive","vuejs2"],"latest_commit_sha":null,"homepage":null,"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/Coreusa.png","metadata":{"files":{"readme":"README.md","changelog":null,"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":"2017-08-23T07:14:15.000Z","updated_at":"2022-06-16T11:45:55.000Z","dependencies_parsed_at":"2022-06-23T12:01:55.059Z","dependency_job_id":null,"html_url":"https://github.com/Coreusa/v-debounce","commit_stats":null,"previous_names":["hydraheim/v-debounce"],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/Coreusa/v-debounce","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Coreusa%2Fv-debounce","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Coreusa%2Fv-debounce/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Coreusa%2Fv-debounce/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Coreusa%2Fv-debounce/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Coreusa","download_url":"https://codeload.github.com/Coreusa/v-debounce/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Coreusa%2Fv-debounce/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":271386641,"owners_count":24750561,"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-08-20T02:00:09.606Z","response_time":69,"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":["debounce","directive","input","vue2","vue2-directive","vuejs2"],"created_at":"2025-08-20T21:25:41.124Z","updated_at":"2026-04-09T10:04:05.799Z","avatar_url":"https://github.com/Coreusa.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Introduction\nDebounce directive for Vue2 to debounce input typing. Forked originally from https://github.com/vuejs-tips/v-debounce\nUpdated to include support for IE.\n\n# Update\nThanks for all the downloads and we hope v-debounce is useful in your project(s)! The next release of v-debounce has finally arrived, and introduces some changes.\n\n## Version changes and potential breaking changes\nv-debounce has a slightly changed code markup compared to earlier. The change is to allow for installing the component globally. See below for how usage has changed.\n\n\n### 0.12 (Previously)\n```\n// In your component\nimport debounce from 'v-debounce'\n\nexport default {\n  name: 'List',\n  directives: {\n    debounce\n  }\n}\n```\n\n### 0.2.0 (Current)\n```\n// In your component\nimport { directive } from 'v-debounce'\n\nexport default {\n  name: 'List',\n  directives: {\n    debounce: directive\n  }\n}\n```\n\n## Install\nInstall the NPM package:\n```\nyarn add v-debounce\n\n# or if you prefer to use npm\n\nnpm install --save v-debounce\n```\n\nAnd then register the directive in your Vue instance, either globally or locally in a component.\n\n```js\n/* --- Install the directive globally --- */\nimport Vue from 'Vue'\nimport debounce from 'v-debounce'\n\nVue.use(debounce)\n\n/* --- Import the directive directly in the component --- */\n// In single file component\n\nimport { directive } from 'v-debounce'\n\nexport default {\n  directives: {\n    debounce: directive\n  }\n}\n```\n\n## Usage\n\n**Template:**\n\nAdd an input in your template that uses the directive. For example a search field like this:\n\n```\n\u003cinput\n  v-model.lazy=\"term\"\n  v-debounce=\"delay\"\n  placeholder=\"Search for something\"\n/\u003e\n```\n\nIn your script section, customize delay and keep track of when term changes, which in this case is 1 second after input has stopped.\n\n**Script:**\n\n```html\n\u003ctemplate\u003e\n  \u003cinput\n    v-model.lazy=\"term\"\n    v-debounce=\"delay\"\n    placeholder=\"Search for something\"\n  /\u003e\n\u003c/template\u003e\n\n\u003cscript\u003e\nimport { directive } from 'v-debounce'\n\nexport default {\n  name: 'example',\n  data () {\n    return {\n      delay: 1000,\n      term: '',\n    }\n  },\n  watch: {\n    term () {\n      // Do something with search term after it debounced\n      console.log(`Search term changed to ${this.term}`)\n    }\n  },\n  directives: {\n    debounce: directive\n  }\n}\n\u003c/script\u003e\n```\n\n**Report issues:**\n\nhttps://github.com/coreusa/v-debounce/issues\n\n### License\nThis repository is licensed under a [MIT license](https://github.com/git/git-scm.com/blob/main/MIT-LICENSE.txt).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcoreusa%2Fv-debounce","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcoreusa%2Fv-debounce","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcoreusa%2Fv-debounce/lists"}