Neurotic Pantaloon Maker
Share your code. npm Orgs help your team discover, share, and reuse code. Create a free org »

sync-queue

0.0.2 • Public • Published

Sync-Queue

Install

npm install sync-queue

Usage

var Queue = require('sync-queue')
var queue = new Queue();
 
queue.place(function one() {
  console.log("I'm func one");
 
  setTimeout(function() {
    console.log("and I'm still finishing up...");
    queue.next();
  }, 1000);
})
 
queue.place(function two() {
  console.log("I'm the last func.");
  queue.next();
});

Description

Use place to put things in the queue. They will start being executed automatically. Call next when you want the next thing in the queue to begin execution.

Keywords

none

install

npm i sync-queue

Downloadsweekly downloads

661

version

0.0.2

license

MIT

homepage

github.com

repository

Gitgithub

last publish

collaborators

  • avatar