{"id":16770495,"url":"https://github.com/mainick/streak-counter","last_synced_at":"2025-03-16T15:19:59.921Z","repository":{"id":63107437,"uuid":"563414433","full_name":"mainick/streak-counter","owner":"mainick","description":null,"archived":false,"fork":false,"pushed_at":"2022-11-10T14:03:17.000Z","size":12,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-02-23T02:49:37.676Z","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":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mainick.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":"2022-11-08T15:06:17.000Z","updated_at":"2023-03-08T23:08:59.000Z","dependencies_parsed_at":"2022-11-13T01:15:16.428Z","dependency_job_id":null,"html_url":"https://github.com/mainick/streak-counter","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/mainick%2Fstreak-counter","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mainick%2Fstreak-counter/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mainick%2Fstreak-counter/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mainick%2Fstreak-counter/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mainick","download_url":"https://codeload.github.com/mainick/streak-counter/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243886191,"owners_count":20363686,"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-10-13T06:24:26.019Z","updated_at":"2025-03-16T15:19:59.896Z","avatar_url":"https://github.com/mainick.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# `@mainick/ts-streak-counter` - a basic streak counter\n\nThis is a basic streak counter - inspired by Duolingo - written in TypeScript and meant for the browser \n(uses `localStorage`). \n\n## Install\n\n```shell\nnpm add @mainick/ts-streak-counter\n```\n\n## Usage\n\n[![Edit streak-counter (ts-course) (forked)](https://codesandbox.io/static/img/play-codesandbox.svg)](https://codesandbox.io/s/streak-counter-ts-course-forked-li3jq9?fontsize=14\u0026hidenavigation=1\u0026theme=dark)\n\n```javascript\nimport {streakCounter} from \"@mainick/ts-streak-counter\"\n\nconst today = new Date();\nconst streak = streakCounter(localStorage, today);\n// streak returns an object: \n// {\n//    currentCount: 1.\n//    startDate: \"11/10/2022\",\n//    lastLoginDate: \"11/10/2022\"\n// }\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmainick%2Fstreak-counter","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmainick%2Fstreak-counter","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmainick%2Fstreak-counter/lists"}