@umweltdk/heartbeat
TypeScript icon, indicating that this package has built-in type declarations

2.0.0 • Public • Published

Heartbeat

Simple heartbeat module for typescript

Usage

import { Heartbeat } from  '@umweltdk/heartbeat';

const  h = new  Heartbeat(1000, () => {
	//callback
});

h.start();
...
h.stop();

intervalDefinition can be both of type number or string. If number is used, the build-in function setInterval will be used. In case of type string cron will be used, and the string must therefore be a valid cron string.

Readme

Keywords

none

Package Sidebar

Install

npm i @umweltdk/heartbeat

Weekly Downloads

0

Version

2.0.0

License

ISC

Unpacked Size

5.96 kB

Total Files

10

Last publish

Collaborators

  • enslev
  • jdpnielsen
  • umweltas