0.0.2 • Published 1 year ago

@shubhambatt997/streak-counter v0.0.2

Weekly downloads
-
License
MIT
Repository
github
Last release
1 year ago

Streak counter

A Basic streak counter api used for tracking your streak. Written with typescript

Installation

npm install streak-counter
yarn add streak-counter

Usage

import { streakCounter } from "@jsjoeio/streak-counter";
const today = new Date();
const streak = streakCounter(localStorage, today);
// streak returns an object:
// {
//    currentCount: 1,
//    lastLoginDate: "11/11/2021",
//    startDate: "11/11/2021",
// }
0.0.2

1 year ago

0.0.1

1 year ago