0.0.2 • Published 11 years ago
walk-dag v0.0.2
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(function(err, data) {
// data === undefined if no more items
})
API
dag(key list, key_function, find_function, comparison_function, next_function) -> fn(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