JSPM

clock-scheduler

0.1.1
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 2
  • Score
    100M100P100Q11530F
  • License ISC

Same as setTimeout and setInterval but pinned to the clock

Package Exports

  • clock-scheduler

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (clock-scheduler) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

clock-scheduler

Build Status Coverage Status WebReflection status

Same as setTimeout and setInterval but pinned to the clock.

import Clock from 'clock-scheduler';
const Clock = require('clock-scheduler');
// https://unpkg.com/clock-scheduler

// will log next date whenever the next minute will tick
const uid = Clock.setTimeout(
  // a callback to invoke at next clock tick
  random => console.log(random, new Date),

  // second(s), minute(s), hour(s), day(s), month(s), year(s)
  'minute',

  // any extra argument allowed, just like setInterval/Timeout
  Math.random()
);
// Clock.clearInterval(uid);