🚀 Launch Week Day 2:Introducing Custom Tabs for Org Alerts.Learn More →
Socket
Book a DemoInstallSign in
Socket

set-timeout

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

set-timeout

Delay the call of a function in a given context.

latest
Source
npmnpm
Version
0.1.0
Version published
Maintainers
1
Created
Source

set-timeout NPM version

Delay the call of a function in a given context.

Based on the excellent mout's timeout implementation, offered to you as a tiny module.

Install with npm

npm i set-timeout --save

Usage

Acts as a wrapper for setTimeout. Calls the given fn within the specified context, after the given delay in ms (milliseconds). The return value can be used to clear the timeout using clearTimeout.

var timeout = require('set-timeout');

var id = timeout(doStuff, 300, this);
clearTimeout(id);

Run tests

npm test

Contributing

Pull requests and stars are always welcome. For bugs and feature requests, please create an issue

Author

Jon Schlinkert

License

Copyright (c) 2014 Jon Schlinkert
Released under the MIT license

This file was generated by verb on December 12, 2014. To update, run npm i -g verb && verb.

Keywords

call

FAQs

Package last updated on 13 Dec 2014

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