{"id":15692801,"url":"https://github.com/ultirequiem/six","last_synced_at":"2025-05-07T14:47:15.466Z","repository":{"id":39544010,"uuid":"454127909","full_name":"UltiRequiem/six","owner":"UltiRequiem","description":"🕵️ Limit the amount of times that setInterval will fire","archived":false,"fork":false,"pushed_at":"2024-05-01T00:10:17.000Z","size":35,"stargazers_count":6,"open_issues_count":1,"forks_count":3,"subscribers_count":2,"default_branch":"main","last_synced_at":"2024-10-20T03:57:22.983Z","etag":null,"topics":["browser","deno","module","node","npm-module","npm-package","typescript"],"latest_commit_sha":null,"homepage":"https://ulti.js.org/six","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/UltiRequiem.png","metadata":{"files":{"readme":"readme.md","changelog":null,"contributing":null,"funding":null,"license":"license.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-01-31T18:45:12.000Z","updated_at":"2023-03-07T04:28:54.000Z","dependencies_parsed_at":"2023-02-17T18:15:17.723Z","dependency_job_id":"a6c06c76-7e94-4a0c-9a3e-74c63eeb021b","html_url":"https://github.com/UltiRequiem/six","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/UltiRequiem%2Fsix","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/UltiRequiem%2Fsix/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/UltiRequiem%2Fsix/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/UltiRequiem%2Fsix/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/UltiRequiem","download_url":"https://codeload.github.com/UltiRequiem/six/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":221259038,"owners_count":16786832,"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":["browser","deno","module","node","npm-module","npm-package","typescript"],"created_at":"2024-10-03T18:40:22.555Z","updated_at":"2024-10-24T01:20:56.934Z","avatar_url":"https://github.com/UltiRequiem.png","language":"TypeScript","funding_links":["https://patreon.com/UltiRequiem"],"categories":[],"sub_categories":[],"readme":"# six\n\n[![codecov](https://codecov.io/gh/ultirequiem/six/branch/main/graph/badge.svg)](https://codecov.io/gh/ultirequiem/six)\n[![deno doc](https://doc.deno.land/badge.svg)](https://doc.deno.land/https/deno.land/x/six/mod.ts)\n\n\u003e Set Interval X\n\nLimit the amount of times that `setInterval` will fire.\n\n\u003e Made for\n\u003e [this StackOverflow Question](https://stackoverflow.com/questions/2956966) 😆\n\n## Usage\n\n### [Deno 🚀](https://deno.land/x/six)\n\n```javascript\nimport { setIntervalX } from \"https://deno.land/x/six/mod.ts\";\nimport { randomNumber } from \"https://deno.land/x/random_number/mod.ts\";\n\nconst API_URL = \"https://leap.deno.dev\";\n\nasync function checkAPIStatus() {\n  const startTime = performance.now();\n\n  const randomYear = randomNumber({ min: 2000, max: 10_000 });\n\n  const response = await fetch(`${API_URL}/${randomYear}`);\n\n  const data = await response.json();\n\n  console.log(`Is ${randomYear} a leap year? ${data.leapYear}.`);\n\n  const entTime = performance.now();\n\n  console.log(`Request took ${(entTime - startTime) / 1000} seconds.`);\n}\n\nsetIntervalX(checkAPIStatus, 2000, 15);\n```\n\n### [Node.js 🐢](https://www.npmjs.com/package/@ultirequiem/six)\n\n```typescript\nimport { setIntervalX } from \"@ultirequiem/six\";\n```\n\n### [Browser 🕸](https://developer.mozilla.org/en-US/docs/Glossary/Browser)\n\nYou can use any [CDN](https://en.wikipedia.org/wiki/Content_delivery_network) 🔥\n\nEg. [ESM](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Modules)\n▶ [SkyPack](https://cdn.skypack.dev/@ultirequiem/six) _/_\n[script tag](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/script) ▶\n[JSDelivr](https://cdn.jsdelivr.net/npm/@ultirequiem/six).\n\nThe API is the same on all this platforms.\n\n## API\n\n[Autogenerated Documentation](https://doc.deno.land/https://deno.land/x/six/mod.ts)\n🚀\n\n## Support\n\nOpen an Issue, I will check it a soon as possible 👀\n\nIf you want to hurry me up a bit\n[send me a tweet](https://twitter.com/intent/tweet?text=%40UltiRequiem%20) 😆\n\nConsider [supporting me on Patreon](https://patreon.com/UltiRequiem) if you like\nmy work 🚀\n\nDon't forget to start the repo ⭐\n\n## Versioning\n\nWe use [SemVer](http://semver.org) for versioning. For the versions available,\nsee the [tags](https://github.com/UltiRequiem/six/tags).\n\n## Authors\n\n[Eliaz Bobadilla (a.k.a UltiRequiem)](https://ultirequiem.com) - Creator and\nMaintainer 💪\n\nSee also the full list of\n[contributors](https://github.com/UltiRequiem/six/contributors) who participated\nin this project.\n\n## Licence\n\nReleased under the MIT Licence.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fultirequiem%2Fsix","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fultirequiem%2Fsix","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fultirequiem%2Fsix/lists"}