{"id":16897791,"url":"https://github.com/behnammodi/tlence","last_synced_at":"2025-03-22T09:31:53.011Z","repository":{"id":57158963,"uuid":"163573224","full_name":"behnammodi/tlence","owner":"behnammodi","description":"debounce and throttle techniques for performance","archived":false,"fork":false,"pushed_at":"2023-07-19T02:22:29.000Z","size":681,"stargazers_count":10,"open_issues_count":10,"forks_count":1,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-05-21T15:33:34.770Z","etag":null,"topics":["debounce","debouncing","delay","javascript","throttle","throttling","wait"],"latest_commit_sha":null,"homepage":"https://npmjs.com/package/tlence","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/behnammodi.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,"governance":null}},"created_at":"2018-12-30T08:32:38.000Z","updated_at":"2023-05-06T07:43:24.000Z","dependencies_parsed_at":"2023-01-21T11:30:52.629Z","dependency_job_id":null,"html_url":"https://github.com/behnammodi/tlence","commit_stats":{"total_commits":33,"total_committers":2,"mean_commits":16.5,"dds":"0.030303030303030276","last_synced_commit":"8258b23ea1d6460144b08fccd1372cd51bb76948"},"previous_names":[],"tags_count":10,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/behnammodi%2Ftlence","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/behnammodi%2Ftlence/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/behnammodi%2Ftlence/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/behnammodi%2Ftlence/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/behnammodi","download_url":"https://codeload.github.com/behnammodi/tlence/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":242975437,"owners_count":20215459,"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":["debounce","debouncing","delay","javascript","throttle","throttling","wait"],"created_at":"2024-10-13T17:39:48.453Z","updated_at":"2025-03-22T09:31:52.671Z","avatar_url":"https://github.com/behnammodi.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# tlence\n\n![tlence](https://user-images.githubusercontent.com/1549069/108704171-e1a4a880-7520-11eb-91cb-88e76b8e12db.png)\n\n[![NPM](https://nodei.co/npm/tlence.png)](https://nodei.co/npm/tlence/)\n\n[![install size](https://packagephobia.now.sh/badge?p=tlence)](https://packagephobia.now.sh/result?p=tlence) [![dependencies](https://david-dm.org/uxitten/tlence.svg)](https://david-dm.org/uxitten/tlence.svg)\n\n\u003ca href=\"https://www.npmjs.com/package/tlence\"\u003e\n  \u003cimg src=\"https://img.shields.io/npm/v/tlence.svg\" alt=\"Version\"\u003e\n\u003c/a\u003e\n\n\u003ca href=\"https://www.npmjs.com/package/tlence\"\u003e\n  \u003cimg src=\"https://img.shields.io/npm/l/tlence.svg\" alt=\"License\"\u003e\n\u003c/a\u003e\n\n\u003ca href=\"https://www.npmjs.com/package/tlence\"\u003e\n  \u003cimg src=\"https://img.shields.io/npm/dm/tlence.svg\" alt=\"Downloads\"\u003e\n\u003c/a\u003e\n\n\u003ca href=\"https://travis-ci.com/github/behnammodi/tlence\"\u003e\n  \u003cimg src=\"https://travis-ci.com/behnammodi/tlence.svg?branch=master\" alt=\"Build Status\"\u003e\n\u003c/a\u003e\n\ndebounce and throttle techniques for performance\n\n## install\n\n```npm\nnpm install tlence\n```\n\n## use\n\n### Throttle\n\n```javascript\nimport { throttle } from 'tlence';\n\nfunction log(server) {\n  console.log('connecting to', server);\n}\n\nconst throttleLog = throttle(log, 5000);\n// just run first call to 5s\nthrottleLog('local');\nthrottleLog('local');\nthrottleLog('local');\nthrottleLog('local');\nthrottleLog('local');\nthrottleLog('local');\n```\n\n### Debounce\n\n```javascript\nimport { debounce, delay } from 'tlence';\nconst debounceLog = debounce(log, 5000);\n// just run last call to 5s\ndebounceLog('local');\ndebounceLog('local');\ndebounceLog('local');\ndebounceLog('local');\ndebounceLog('local');\ndebounceLog('local');\n```\n\n### Delay\n\n```javascript\nimport { delay } from 'tlence';\nconsole.log('delay 1');\nawait delay(5000);\n// run after 5s\nconsole.log('delay 2');\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbehnammodi%2Ftlence","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbehnammodi%2Ftlence","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbehnammodi%2Ftlence/lists"}