1.0.4 • Published 2 years ago

use-streak v1.0.4

Weekly downloads
-
License
MIT
Repository
github
Last release
2 years ago

Streak Counter

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

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",
// }

Edit vigorous-wood-o8m7w

LICENSE

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

1.0.4

2 years ago

1.0.3

2 years ago

1.0.2

2 years ago

1.0.1

2 years ago

1.0.0

2 years ago