pull-traverse
[![travis](https://travis-ci.org/dominictarr/pull-traverse.png?branch=master)](https://travis-ci.org/dominictarr/pull-traverse)
Last updated 12 years ago by dominictarr .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install pull-traverse 
SYNC missed versions from official npm registry.

pull-traverse

travis

depthFirst, widthFirst, leafFirst (start, createStream)

Traverse a tree structure. start is a value that represents a node. createStream is a function that returns a pull-stream of the children of a node. start must be the same type output by createStream.

var pull = require('pull-stream')
var pt   = require('pull-traverse')

pull(
  pt.widthFirst(objects, function (object) {
    if(object && 'object' === typeof object)
      return pull.values(object)
    return pull.empty()
  }),
  pull.log()
)

License

MIT

Current Tags

  • 1.0.3                                ...           latest (12 years ago)

4 Versions

  • 1.0.3                                ...           12 years ago
  • 1.0.2                                ...           12 years ago
  • 1.0.1                                ...           12 years ago
  • 1.0.0                                ...           13 years ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 0
Dependencies (0)
None
Dev Dependencies (2)

Copyright 2013 - present © cnpmjs.org | Home |