1.0.3 • Published 8 years ago

async-depth-first v1.0.3

Weekly downloads
76
License
MIT
Repository
github
Last release
8 years ago

async-depth-first

Depth first traversal for recursive, asynchronous JavaScript functions.

Build Status

npm install async-depth-first
var depthFirst = require('async-depth-first')

var q = depthFirst()
q.defer(function (cb) {
  console.log('1')
  q.defer(function (cb) {
    console.log('1.1')
    q.defer(function (cb) {
      console.log('1.1.1')
      cb()
    })
    cb()
  })
  q.defer(function (cb) {
    console.log('1.2')
    cb()
  })
  cb()
})
q.defer(function (cb) {
  console.log('2')
  cb()
})
q.done(function (err) {
  console.log('done')
})

Outputs

1
1.1
1.1.1
1.2
2
done

License

MIT

1.0.3

8 years ago

1.0.2

8 years ago

1.0.1

9 years ago

1.0.0

9 years ago