1.0.4 • Published 2 years ago

what-is-today v1.0.4

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

what-is-today

Licence NPM

Lightweight and no dependencies package to check what day is today.

Bundle size: 500B minified, 306B minified + gzipped\ Bundlephobia link

Documentation

import { isToday } from 'what-is-today';

isToday('Tuesday'); // returns true/false

The day is not case sensitive an you could also pass 'TUESDAY' or 'tuesday'.\ If you don't pass a valid day, it will return the string No valid day was given.

import { todayIs } from 'what-is-today';

todayIs(); // returns tuesday (or whatever the day is)

JSX:

{isToday('Wednesday') ? 'I should work' : 'Get some rest!'}

Contributing

Contributions are always welcome!

Authors

@tpliakas