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

microtask

Package Overview
Dependencies
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

microtask

microtask

latest
Source
npmnpm
Version
0.1.9
Version published
Maintainers
1
Created
Source

Build Status

microTask - A best effort nextTick shim

Synopsis

Defers a task to aid with asynchronous processing in a single threaded environment.

  • microtask()

microtask(task:Function, args:Array, context:Object)

Execute task on next event loop / tick

  • param Function task - the function to call
  • param Array args - array of arguments
  • param Object context - task context

Example:

   function myTask(a,b,c){
      console.log(a,b,c);
   }
   microtask(myTask,["hello","world","!"]);
   // 
   doSomethingElse();
   // ...after next event tick ... => "Hello world!"

Keywords

microTask

FAQs

Package last updated on 05 Nov 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