JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 2847
  • Score
    100M100P100Q104288F
  • License MIT

schedule a cancellable function to run once

Package Exports

  • at-node

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 (at-node) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

At

A cancellable, scheduled function for node

Installation

npm i --save at-node

Usage

const at = require('at-node');

// schedule a function by passing in a date or a datestring
at(new Date('10/10/2018'), cb);
at('10/10/2018', cb);

// a function is returned that cancels the scheduled function
const cancelCb = at('January 1, 2018', cb);

// change your mind?
cancelCb();

Testing

npm test