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

skywalker-x

v0.5.3

Published

Builds on [skywalker](https://github.com/Xananax/skywalker) and provides several filters and convenience functions.

Downloads

3

Readme

Skywalker-Extended

Builds on skywalker and provides several filters and convenience functions.

Automatically parses:

  • stylus, less, sass
  • markdown
  • json, xml, yaml
  • coffeescript
  • plain text files
  • browserifies js files that have extension '.bs.js'

Additionally:

  • Provides human-readable size reading ("Mb", "Kb"...)
  • Gets image sizes and ratios
  • Provides a checksum for filenames (can be used to identify them)
  • Provides a uniqueId for each file

Use the filters as they are or as a basis for implementing your own. More to come!


Filters

Each filter can be set on by calling filter_<filter_name>
For example:

        var Tree = require('skywalker-x')
        var t = Tree(dir)
            .ignoreDotFiles()
            .filter_contents()
            .filter_json()
            .filter_stylus()
            .filter_websafe()
            .start(function(err,results){
                //do something here
            });

you can set filters options like so:

    t.filterOptions({jade:{/**options**/}});

You can call options several times with different options, they will all merge.

You can also set

    t.devMode('development');

To set sensible default options (source maps, debug, etc);

To get an idea of filters and what they can do, refer to the /filters directory, and check out the tests.


Additional functions

skywalker-extended extends (duh) skywalker with the following functions (on top of the series of filter_XXX() ones):

  • t.filterOptions({}) to set options for certain filters
  • t.devMode(string) to set mode. Defaults to 'development'
  • t.obtainFilterOptions(pluginName,defs) this is used internally by the plugins to retrieve their own options.

License

MIT