new_day_event

Package that can help you to now if new day is started in javascript

Usage no npm install needed!

<script type="module">
  import newDayEvent from 'https://cdn.skypack.dev/new_day_event';
</script>

README

New day event

Very simple library that can help you to now if new day is started

  • Npm installing:
    npm i new_day_event
    import from node_modules
    import 'new_day_event'

  • Installing without npm:
    git clone https://github.com/Volizik/new_day_event.git
    and inside your project add this line before your own script tag
    <script src="path/to/new_day_event/directory"></script>

  • Usage:

document.addEventListener('new-day', function() {
    alert('New day is started!')
});

Warning! Only for client side.