npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

npipes-client

v0.1.5

Published

Some Syntactic sugar on top of nPipes

Downloads

25

Readme

npipes-client-js

Some nice syntactic sugar on top of nPipes.

let person = '...';
let traversals = [];

// Get parents
traversals.push(new Traversal()
  .set('traversal', 'parents')
  .node(person)
  .out('Birth_Child_Ref')
  .mark('birth')
  // Get Birth Date
  .outOpt('Birth_Date_Ref', 1, new Traversal()
    .save('date.original', 'original')
    .save('date.formal', 'formal')
    .back('birth')
  )
  // Get Birth Place
  .outOpt('Birth_Place_Ref', 1, new Traversal()
    .save('place.name', 'name')
    .back('birth')
  )
  // Get Parents
  .inOpt(['Birth_Mother_Ref', 'Birth_Father_Ref'], new Traversal()
    .save('parent.id', '_id')
    .outOpt('Name_Person_Ref', 1, new Traversal()
      .save('parent.name', 'name')
    )
  )
  .compile();
);

// Get children
traversals.push(new Traversal()
  .set('traversal', 'children')
  .node(person)
  .out(['Birth_Mother_Ref', 'Birth_Father_Ref'])
  .mark('birth')
  // Get Birth Date
  .outOpt('Birth_Date_Ref', 1, new Traversal()
    .save('date.original', 'original')
    .save('date.formal', 'formal')
    .back('birth')
  )
  // Get Birth Place
  .outOpt('Birth_Place_Ref', 1, new Traversal()
    .save('place.name', 'name')
    .back('birth')
  )
  // Get Children
  .inOpt('Birth_Child_Ref', new Traversal()
    .save('id', '_id')
    .outOpt('Name_Person_Ref', 1, new Traversal()
      .save('child.name', 'name')
    )
  )
  .compile()
);

Trepo.request({
    method: 'POST',
    path: '/traversal/run',
    body: traversals
  })
  .then(response => {
    // response is our executed traversals.
  })
  .catch(error => {
    // whoops, there was an error.
  });

Traversal

A Set of Steps that will be executed.

compile()

Compiles all of the steps and outputs a JSON traversal.

node(id)

Get a node by id.

out(labels, [limit])

From a node, follow outgoing edges having labels to other nodes. Optionally limit the number of edges using limit.

in(labels, [limit])

From a node, follow incoming edges having labels to other nodes. Optionally limit the number of edges using limit.

outOpt(labels, [limit], Traversal)

If a node has outgoing edges matching label, execute the passed in traversal. Optionally limit the number of edges using limit.

inOpt(labels, [limit], Traversal)

If a node has incoming edges matching label, execute the passed in traversal. Optionally limit the number of edges using limit.

mark(marker)

Mark a node so we can backtrack to it using back(marker).

back(marker)

Backtrack to a node we've previously visited.

save([key, value] || [obj])

Save one or more properties in the paylaod of a traversal. Takes in a propertyKey/payloadKey pair or an object of propertyKey => payloadKey pairs. Note that propertyKeys that begin with _ are meta property keys (i.e. id, label, etc).

set([propertyKey, payloadKey] || [obj])

Set one or more values in the payload of a traversal. Takes in a key/value pair or an object of key => value pairs.

Response

// TODO

  • group by payload key (i.e. type)
  • status information on each traversal