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

ique

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

ique

A queue that runs tasks when the browser is idle.

latest
Source
npmnpm
Version
0.0.2
Version published
Maintainers
1
Created
Source

ique

ique on NPM ique Downloads on NPM Standard JavaScript Style

A queue that runs tasks when the browser is idle.

Install

$ npm install ique --save

Use

import ique from 'ique'

// create a queue, passing a timeout (default shown)
// more on timeouts here: https://goo.gl/4jLPWz
const queue = ique(1000)

// add tasks to it, which will be run automatically when the browser is idle
for (let i = 0; i < 1000; i++) {
  queue.add({
    func: x => console.log(x),
    args: ['test']
  })
}

Browser Support

Requires requestIdleCallback, and as such supports the following:

  • Chrome 47+
  • Firefox 55+
  • Opera 34+

Consider using this shim in unsupported browsers.

License

MIT. © 2018 Michael Cavalea

FAQs

Package last updated on 24 Feb 2018

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