walk-dag

0.0.2 • Public • Published

dag-walk

walk a directed acyclic graph, given a key function, comparison function, find function, and a next function.

  var walk = dag(['HASH1', 'HASH2'], key, find, cmp, next)
 
  walk(null, function(err, data) {
    // data === undefined if no more items
  })

API

dag([key list], key_function, find_function, comparison_function, next_function) -> fn(close, ready)

create a dag walker using the following definitions:

key_function(object) -> "key"
find_function("key", ready(err, data))
comparison_function(object, object) -> [-1...1]
next_function(object) -> ["key", "key", ...]

License

MIT

Readme

Keywords

none

Package Sidebar

Install

npm i walk-dag

Weekly Downloads

0

Version

0.0.2

License

MIT

Last publish

Collaborators

  • chrisdickinson