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

@koax/timing

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@koax/timing

Delay, timeout, and interval effects.

latest
Source
npmnpm
Version
0.1.2
Version published
Maintainers
1
Created
Source

timing

Build status Git tag NPM version Code style

Delay, timeout, and interval effects. (Included in koax)

Installation

$ npm install @koax/timing

Usage

import {delay, timeout, interval} from '@koax/timing'

function * () {
  yield delay(500)
  // do something later
}

function * () {
  yield timeout(doSomethingLater, 500)
  // do something now
}

function * () {
  let task = yield interval(repeatSomething, 500)
  // do something and then cancel
  yield cancel(task)
}

API

delay(wait)

  • wait - time to block

Returns: delay action

timeout(fn, wait)

  • fn - function to run after wait ms
  • wait - time to wait

Returns: timeout action

interval(fn, wait)

  • fn - function to run on an interval
  • wait - time in between runs

Returns: interval action

License

MIT

FAQs

Package last updated on 12 Feb 2016

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