1.1.0 • Published 10 years ago

ordine v1.1.0

Weekly downloads
32
License
Beerware
Repository
github
Last release
10 years ago

alt text

Callbacks made almost easy

Simple queue system to handle callbacks

Constructor :

    var myQueue = new Ordine(function(){
      console.log('uh!?')
    })

Constructor arguments :

callback(function): This the only required argument which is the callback for the queue.

#Enqueue method :

    var myQueue = new Ordine(function(){
      console.log('uh!?')
    })
    .enqueue(function(){

      window.setTimeout(function(){
        console.log('first')
        myQueue.next()
      },1000);
    })

    .enqueue(function(){
      window.setTimeout(function(){
        console.log('second')
        myQueue.next()
      },1000);
    },false)

    .enqueue(function(){
      window.setTimeout(function(){
        console.log('third')
        myQueue.next()
      },1000);
    },true)
    .run()

Enqueue arguments :

Proccess(function):

Asynchronous stuff.

Sync(boolean):

This argument have to be the answer for the question : "This process will wait the previous process end to be executed"

Run Method :

The run method trigger the queue execution.

// Cycle Icon designed by Nick Remis - http://www.thenounproject.com/nremis/

1.1.0

10 years ago

1.0.1

10 years ago

1.0.0

10 years ago

0.0.9

10 years ago

0.0.8

10 years ago

0.0.7

10 years ago

0.0.6

10 years ago

0.0.5

10 years ago

0.0.4

10 years ago

0.0.3

10 years ago

0.0.2

10 years ago

0.0.1

10 years ago