New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

node-postpone

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

node-postpone

Postpone function execution

latest
Source
npmnpm
Version
0.1.2
Version published
Maintainers
1
Created
Source

Node.js Postpone

Postpone function execution

Installation

npm install node-postpone --save

Usage

var postpone = require('node-postpone');

var now = postpone.now();

postpone.wait(1000, function() {
  console.log('done after 1 sec');
});

postpone.runasync(1000,
    function() {
        console.log('done task 1 : immediately');
    },
    function() {
        console.log('done task 2 : after 1 sec');
    }
);

postpone.runsync(1000,
    function() {
        console.log('done task 1 : immediately');
    },
    function() {
        console.log('done task 2 : 1 sec after task 1');
    }
);

Unit tests

npm test

License

MIT

Keywords

wait

FAQs

Package last updated on 19 Jul 2017

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