1.0.0 • Published 6 years ago

bone-delay v1.0.0

Weekly downloads
3
License
ISC
Repository
github
Last release
6 years ago

Bone-delay

Install

npm install bone-delay --save

Quik start

<script type="text/javascript" src="./bonedelay.min.js"></script>

or

import boneDelay from 'bone-delay'

Example

var father = new BoneDelay()
var child1 = new BoneDelay()
var child2 = new BoneDelay()

child1
.wait(1000) // wait 1000ms
.then(function(){
  // do something
})
.wait(1000)
.then(function(){
  // do something
})

child2.wait(1000)
.then(function(){
  // do something
})

father
.then(child1) // run  child1 process
.wait(2000)
.then(child2) // run  child2 process
.start()

father.stop() // stop father process
father.stopAll() // stop all process including father and child
1.0.0

6 years ago