index.js
function createGraphIterators(graph) {
  return {
    /**
     * Creates a vertex iterator stream. This is an entry point for all traversal
     * starting with a node.
     *
     * @param  {string|number} [startFrom] vertex id to start iteration from.
     *  If this argument is omitted, then all graph nodes are iterated
     *
     * @returns {VertexPipe}
     */
    V: function createVertexStream(startFrom) {
      var VertexPipe = require('./lib/pipes/vertexPipe');
      var VertexIterator = require('./lib/iterators/vertexIterator');

      var vertexPipe = new VertexPipe(graph);
      vertexPipe.setSourcePipe(new VertexIterator(graph, startFrom));
      return vertexPipe;
    }
  };
}
function createGraphIterators(graph) {
  return {
    /**
     * Creates a vertex iterator stream. This is an entry point for all traversal
     * starting with a node.
     *
     * @param  {string|number} [startFrom] vertex id to start iteration from.
     *  If this argument is omitted, then all graph nodes are iterated
     *
     * @returns {VertexPipe}
     */
    V: function createVertexStream(startFrom) {
      var VertexPipe = require('./lib/pipes/vertexPipe');
      var VertexIterator = require('./lib/iterators/vertexIterator');

      var vertexPipe = new VertexPipe(graph);
      vertexPipe.setSourcePipe(new VertexIterator(graph, startFrom));
      return vertexPipe;
    }
  };
}
function createGraphIterators ( graph ) { return { /**
     * Creates a vertex iterator stream. This is an entry point for all traversal
     * starting with a node.
     *
     * @param  {string|number} [startFrom] vertex id to start iteration from.
     *  If this argument is omitted, then all graph nodes are iterated
     *
     * @returns {VertexPipe}
     */ V : function createVertexStream ( startFrom ) { var VertexPipe = require ( './lib/pipes/vertexPipe' ) ; var VertexIterator = require ( './lib/iterators/vertexIterator' ) ; var vertexPipe = new VertexPipe ( graph ) ; vertexPipe . setSourcePipe ( new VertexIterator ( graph , startFrom ) ) ; return vertexPipe ; } } ; }
Creates a wrapper to iterate over graph. A wrapper contains methods which
allows you to begin iteration. Currently we support only vertices as iterator
starters, but in future we can easily extend this and add edges

@param {ngraph.graph|Viva.Graph.graph} graph source graph we want to iterate over
Creates a wrapper to iterate over graph . A wrapper contains methods which allows you to begin iteration . Currently we support only vertices as iterator starters but in future we can easily extend this and add edges