{"id":13411301,"url":"https://github.com/manuelernestog/click-handler","last_synced_at":"2025-03-18T20:30:57.502Z","repository":{"id":65526075,"uuid":"516421980","full_name":"manuelernestog/click-handler","owner":"manuelernestog","description":"Handle click and dblclick events on same element on javascript.","archived":false,"fork":false,"pushed_at":"2022-07-30T16:37:39.000Z","size":4,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-02-28T12:20:17.350Z","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/manuelernestog.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":"2022-07-21T15:17:48.000Z","updated_at":"2023-03-07T13:01:32.000Z","dependencies_parsed_at":"2023-01-27T08:45:16.077Z","dependency_job_id":null,"html_url":"https://github.com/manuelernestog/click-handler","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/manuelernestog%2Fclick-handler","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/manuelernestog%2Fclick-handler/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/manuelernestog%2Fclick-handler/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/manuelernestog%2Fclick-handler/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/manuelernestog","download_url":"https://codeload.github.com/manuelernestog/click-handler/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243950792,"owners_count":20373664,"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-07-30T20:01:12.756Z","updated_at":"2025-03-18T20:30:57.224Z","avatar_url":"https://github.com/manuelernestog.png","language":"JavaScript","funding_links":[],"categories":["Web Development"],"sub_categories":["Javascript"],"readme":"# manuelernestog/click-handler\n\n[![npm (scoped)](https://img.shields.io/npm/v/@bamblehorse/tiny.svg)](https://www.npmjs.com/package/@manuelernestog/click-handler)\n[![npm bundle size (minified)](https://img.shields.io/bundlephobia/min/@bamblehorse/tiny.svg)](https://www.npmjs.com/package/@manuelernestog/click-handler)\n\nHandle click and dblclick events on same element on javascript.\n\n## Install\n\n```bach\n$ npm install @manuelernestog/click-handler\n// or\n$ yarn add @manuelernestog/click-handler\n```\n\n## Usage\n\n```js\nimport ClickHandler from(\"@manuelernestog/click-handler\");\n\nconst clickDelay = 500; // delay it's optional (350 miliseconds by default)\nvar clickHandler = new ClickHandler(clickDelay);\n\nfunction onClickActions() {...}\nfunction onDblClickActions() {...}\n\n// Call the handle method inside your click action\nfunction onClick() {\n\n    clickHandler.handle(onClickActions,onDblClickActions);\n\n    // If you need to handle this behavior in different elements in the same view, add the ID for isolating the state of each element\n clickHandler.handle(onClickActions,onDblClickActions,elementId);\n\n}\n\n\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmanuelernestog%2Fclick-handler","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmanuelernestog%2Fclick-handler","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmanuelernestog%2Fclick-handler/lists"}