Socket
Socket
Sign inDemoInstall

dezorse

Package Overview
Dependencies
0
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    dezorse

Like dezalgo but let you choose your "asap" function.


Version published
Weekly downloads
1
Maintainers
1
Install size
3.03 kB
Created
Weekly downloads
 

Readme

Source

dezorse

Build Status js-standard-style

Like dezalgo but let you choose your "asap" function. If you're writing for Node.js only or need very high throughput, just use dezalgo.

dezorse defaults to setTimeout which is available everywhere.

Getting started

npm install dezorse


var dezorse = require('dezorse');

or

<script src="node_modules/dezorse/index.js"></script>
var dezorse = window.dezorse

Usage

// maybe you don't care for performances ?
dezorse(fn) // will use setTimeout

// maybe you need to yield for IO/reflow/repaint ?
// https://github.com/YuzuJS/setImmediate
dezorse(fn, setImmediate)

// maybe you just need Node.js support ? (bad example, use dezalgo)
dezorse(fn, process.nextTick)

// maybe you already have a Promise polyfill or only target platforms with Promise support ?
dezorse(fn, function () {
  Promise.resolve().then(fn)
})

Test

npm install standard
npm test

Keywords

FAQs

Last updated on 20 Apr 2016

Did you know?

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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc