All Projects β†’ jsjoeio β†’ use-streak

jsjoeio / use-streak

Licence: MIT License
a streak counter to track your streak in days (similar to Duolingo)

Programming Languages

typescript
32286 projects
javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to use-streak

github-readme-streak-stats
πŸ”₯ Stay motivated and show off your contribution streak! 🌟 Display your total contributions, current streak, and longest streak on your GitHub profile README
Stars: ✭ 1,395 (+5265.38%)
Mutual labels:  streak
duolingo-desktop
Desktop client for the Duolingo language learning application
Stars: ✭ 34 (+30.77%)
Mutual labels:  duolingo
aprendendo-css
VΓ‘rios desenhos feitos com CSS e SCSS (e as vezes um pouco de JavaScript)
Stars: ✭ 56 (+115.38%)
Mutual labels:  duolingo
duolingo-scripts
User scripts for duolingo.com
Stars: ✭ 24 (-7.69%)
Mutual labels:  duolingo
memorize
Code and real data for "Enhancing Human Learning via Spaced Repetition Optimization", PNAS 2019
Stars: ✭ 155 (+496.15%)
Mutual labels:  duolingo
Uhabits
Loop Habit Tracker, a mobile app for creating and maintaining long-term positive habits
Stars: ✭ 4,555 (+17419.23%)
Mutual labels:  streak
duolingo-solution-viewer
A browser extension providing access to the lists of solutions to the translation / listening challenges on Duolingo, and restoring the correction of typos for listening challenges.
Stars: ✭ 31 (+19.23%)
Mutual labels:  duolingo

useStreak - a basic streak counter

npm

This is a basic streak counter - inspired by Duolingo - written in TypeScript and meant for the browser (uses localStorage).

Install

yarn add use-streak
npm install use-streak

Usage

import { useStreak } from "use-streak";

const today = new Date();
const streak = useStreak(localStorage, today);
// streak returns an object:
// {
//    currentCount: 1,
//    lastLoginDate: "11/11/2021",
//    startDate: "11/11/2021",
// }

screenshot of streak demo

Edit vigorous-wood-o8m7w

LICENSE

MIT. Just make sure you give acknowledgements to this repo.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].