@jquince/streak-counter
TypeScript icon, indicating that this package has built-in type declarations

1.0.0 • Public • Published

@jquince/streak-counter - A streak counter to cheers users progress

This is a streak counter - Inspired by Duolingo- But for browser and use localStorage

Install

 npm @jquince/streak-counter
 yarn @jquince/streak-counter

Usage

import { streakCounter } from '@jquince/streak-counter';

const today = new Date();

const streak = streakCounter(localStorage, today);

/**
 *  streak returns an object
 *
 * {
 *  currentCount: 1,
 *  lastLoginDate: '11/11/11
 *  startDate: '09/11/10'
 * }
 * /

Readme

Keywords

Package Sidebar

Install

npm i @jquince/streak-counter

Weekly Downloads

2

Version

1.0.0

License

ISC

Unpacked Size

26.7 kB

Total Files

16

Last publish

Collaborators

  • jquince