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

streamur

v1.0.7

Published

A very capable asset manager. And a few more things.

Readme

StreamUR

A very capable asset manager for node. But also a lot more.

Installation

$ npm install streamur

Asset Manager

It is intuitive to use streamur as a powerful asset manager, easily allowing to minify and gzip resources.

Example:

var streamur = require('streamur');

//register a few streams:
streamur.stream("jquery", "https://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.js");
streamur.stream("myscript", __dirname+"/public/js/myscript.js");

app.use('/assets/', streamur());

You can then request:

  • /assets/jquery.myscript.js, which will be the combination of both files
  • /assets/jquery.myscript.min.js, same as above but the files are minified.
  • /assets/jquery.myscript.min.gzip.js, same as above, but the minified files are gziped.

StreamUR revolves around two core concepts: streams ('jquery' and 'myscript') that are user defined and processors ('.', 'min', 'gzip' and 'js') that are provided.

Other uses

That's great for managing your assets but there is more StreamUR can do for you. For instance the jslint processors runs the JSLINT tool on the javscript code and presents the results:

/assets/myscript.jslint.json

Makes it easy for you to check how well your code is doing!

But JSON is not very nice to read. To get a nicer view of the results, you can use the prettyjslint processor that returns HTML:

/assets/myscript.prettyjslint.html

There are other useful processors that can be used, see the full list below.

Streams

Register streams by calling the streamur.stream(name, locator) method.

name is descriptor used for that stream and can only contain [a-z0-9].

locator is the path at which this stream can be found. It may be an absolute file path or a URL.

Example:

streamur.stream("jquery", "https://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.js");
streamur.stream("myscript", __dirname+"/public/js/myscript.js");

Processors

There are a number of processors that apply to different types of streams, and more are in development, stay tuned!

dot (.)

The concatination processor for streams. It groups streams together and chains them to the next processor.

min

Minifies javascript code using uglifyjs.

gzip

Gzips files and sets the proper header on the response. Uses gzip.

jslint

Runs JSLINT on the stream and returns the result as raw JSON.

prettyjslint

Runs JSLINT on the stream and formats the results in HTML format.

highlight

Highlights Javascript code in the stream using highlight. Returns HTML

nocache

Sets No-cache headers on the response, telling the client that the resource should not be cached.

html

Sets the response's content type as HTML.

js

Sets the response's content type as Javascript.

json

Sets the response's content type as JSON.

css

Sets the response's content type as CSS.

Aliases

Aliases are useful to shorten the names of ressources (such as when many streams are concatinated together). To create an alias, use streamur.alias(name, alias).

Example:

streamur.alias('scripts', 'jquery.underscore.backbone.myscript1.myscrip2');

You can then request scripts.min.js which would yield an identical result as jquery.underscore.backbone.myscript1.myscrip2.min.js.

Caching

StreamUR caches the result of each script access. This is important especially as some processors are CPU intensive and take a long time to complete (e.g. min). If you use StreamUR in production, it is recommended that each resource is accessed at least once after server startup to populate the cache.

License

Source code is licenced under The MIT License.

Contributors

This project was initially developped for the Summer Blast-off Hackathon, Saturday, June 23, 2012.

git-summary:

project  : streamUR
repo age : 10 days ago
active   : 6 days
commits  : 166
files    : 25
authors  : 
   84	Julien Dreux            50.6%
   37	Thomas Getgood          22.3%
   32	Stephen R. Hamilton     19.3%
   12	ben-zen                 7.2%
    1	jdreux                  0.6%