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 🙏

© 2024 – Pkg Stats / Ryan Hefner

ndn-contrib

v0.1.18

Published

Reusable 'Classes' for Named Data Networking: NameTree, PIT, FIB, ContentStore, Interfaces, and Transports

Downloads

11

Readme

NDN-Contrib - Expanded Class Library on top of NDN-js

NDN-js offers the common client Named Data Networking library in pure javascript. This is an expansion upon that work, offering a modular set of javascript 'classes' for building NDN enabled apps in Node.js, the browser, and even exciting runtimes like breach and atom-shell.

  • DataStructures

    • NameTree
    • ContentStore with modular entries for caching, database indexing, etc.
    • PIT - Pending Interest Table with modular entry options (callbacks or integer IDs)
    • FIB - Forwarding Interest Base
    • Interfaces - Interface manager accepting any combination of transports
  • Transports -

Usage

simply require("ndn-contrib") in your project (use browserify for browser projects)

var ndn = require("ndn-contrib");

all the classes are now attached to the ndn object (including ndn-js @ ndn.ndn), and are ready to go...

var myInterfaces = new ndn.Interfaces(/*Subject*/)
ndn.WebSocketServer.defineListener();
myInterface.installProtocol(ndn.WebSocketServer);

now you have a websocket server accepting incoming connections and handing interest and data packets to your subject! For more, detail see the full documentation.

You can also include just part of the library by doing something like

var ndn = require("ndn-lib");
var Interfaces = require("ndn-contrib/src/DataStructures/Interfaces.js");
Interfaces.installNDN(ndn); /** This is done for you if you require("ndn-contrib"),
                             * it's a safety measure to avoid 'instanceof' bugs.
                             */

Contributing

grunt watch // do everything automatically while coding
grunt suite // run all the tests
grunt jsdoc // generate documentation

Bug reports and pull requests welcome! lint, doc, and test are all registered tasks in Gruntfile.js, and will run automatically for you when you use grunt watch. Browser tests are also assembled via grunt in the test/browser directory, and have a livereload script that will re-compile and run them when watch is running. Happy hacking!

License

LGPL (vTBD)

Contact

Ryan Bennett, Colorado State University. [email protected]