{"id":48268193,"url":"https://github.com/hazae41/pendule","last_synced_at":"2026-06-09T21:03:23.961Z","repository":{"id":348651243,"uuid":"1199155038","full_name":"hazae41/pendule","owner":"hazae41","description":"Time-based one-time passcodes (TOTP) for the web","archived":false,"fork":false,"pushed_at":"2026-06-03T08:41:09.000Z","size":30,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-06-03T10:22:01.597Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","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/hazae41.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null},"funding":{"github":["hazae41"],"patreon":"hazae41"}},"created_at":"2026-04-02T05:06:13.000Z","updated_at":"2026-06-03T08:41:14.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/hazae41/pendule","commit_stats":null,"previous_names":["hazae41/pendule"],"tags_count":5,"template":false,"template_full_name":null,"purl":"pkg:github/hazae41/pendule","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hazae41%2Fpendule","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hazae41%2Fpendule/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hazae41%2Fpendule/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hazae41%2Fpendule/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/hazae41","download_url":"https://codeload.github.com/hazae41/pendule/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hazae41%2Fpendule/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34125332,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-09T02:00:06.510Z","response_time":63,"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":[],"created_at":"2026-04-04T22:00:29.182Z","updated_at":"2026-06-09T21:03:23.955Z","avatar_url":"https://github.com/hazae41.png","language":"TypeScript","funding_links":["https://github.com/sponsors/hazae41","https://patreon.com/hazae41"],"categories":["TypeScript"],"sub_categories":[],"readme":"# Pendule\n\nTime-based one-time passcodes (TOTP) for the web\n\n```bash\nnpm install @hazae41/pendule\n```\n\n[**📦 NPM**](https://www.npmjs.com/package/@hazae41/pendule)\n\n## Features\n\n### Current features\n- 100% TypeScript and ESM\n- Minimal dependencies\n- SHA-1 TOTP\n\n## Usage\n\n### SHA-1 TOTP\n\nParse generator secret\n\n```tsx\nconst totp = Sha1Totp.parse(\"JBSWY3DPEHPK3PXP\")\n```\n\nParse generator url\n\n```tsx\nconst totp = Sha1Totp.parse(\"otpauth://totp/?secret=AAAABBBB22223333YYYYZZZZ66667777\")\n```\n\n### Codes\n\nGenerate the current code\n\n```tsx\nconst code = await totp.generate()\n```\n\nAutomatically update code (with a margin of error of 1 second)\n\n```tsx\nsetInterval(() =\u003e {\n  code = await totp.generate()\n}, 1000)\n```\n\nLog codes every time there is a new one\n\n```tsx\nconst period = totp.period * 1000\n\nconst elapsed = Date.now() % period\n\nconst remaining = period - elapsed\n\nsetTimeout(() =\u003e {\n  console.log(await totp.generate())\n\n  setInterval(() =\u003e {\n    console.log(await totp.generate())\n  }, period)\n\n  // New codes will now be displayed\n}, remaining)\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhazae41%2Fpendule","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhazae41%2Fpendule","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhazae41%2Fpendule/lists"}