Socket
Book a DemoInstallSign in
Socket

periodic

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

periodic

Reliable periodic events.

latest
Source
npmnpm
Version
0.0.2
Version published
Maintainers
1
Created
Source

periodic

Reliable periodic events.

Build Status

browser support

Usage

var periodic = require('periodic');

var ticks = 0;

periodic(1000)
  .on('tick', function () {
    console.log('tick');
    if (++ticks == 10) this.end();
  })

API

periodic(interval)

Return a new periodic that emits tick events every interval milliseconds.

periodic tries to stay in time even when the event loop is busy.

periodic#end()

Stop emitting.

Installation

With npm do

$ npm install periodic

Alternatively, with component do

$ component install juliangruber/periodic

Alternatives

every by chrisdickinson has a nicer name but the overall interface and implementation are too complex for my needs.

License

(MIT)

Keywords

timer

FAQs

Package last updated on 22 Mar 2013

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts