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

mota-webdevtools

v0.3.0

Published

Tools to make the lives of web developers easier.

Readme

Mota Web Dev Tools

License npm Dependency Status Travis

Tools to make the lives of web developers easier.

Features

var tools = require( "mota-webdevtools" );

Building

tools.findFiles( {
  src: [ "src/index.js" ],
  micromatch: false
} )

.lift( tools.transformers.Rollup( {
  options: {},
  generate: {
    format: "es6"
  }
} ) )

.lift( tools.transformers.rename( function( file ) {
  return file.replace( "src/", "dist/" );
} ) )

.lift( tools.transformers.write() )

.subscribe( {
  complete: function() {
    console.log( "Build done!" );
  },
  error: function( e ) {
    console.log( e );
  }
} );

Linting

tools.readFiles( {
  cwd: "src",
  src: [ "**/**.js" ],
  micromatch: {}
} )

.lift( tools.transformers.Lint() )

.subscribe( {
  complete: function() {
    console.log( "Files lint free!" );
  },
  error: function( e ) {
    console.log( e );
  }
} );

// Or, as of 0.2.1

tools.lint( {
  cwd: "src",
  src: [ "**/**.js" ]
}, {} ).then( null, function( e ) {
  console.log( e );
} );

Server and livereload

var server = tools.createServer( 9009, function() {
  // Listening in port 9009...
} );

var watcher = tools.watch( "src/**/*.js" );
watcher.on( "all", server.liveReloader );

Testing

Includes features so that you can use the same testing code on the NodeJS side or Browser side.

tools.test.exportGlobals();
// global.ROOT == global, global.ISENVNODE == true, global.QUnit == require( "qunitjs" )

tools.test.load(); // Runs QUnit.load(). It's necessary on the nodejs side.

tools.test.loadTests( [ // Synchronously loads some js files
  "./spec_1.js",
  "./spec_2.js"
] ); // ...same as...

[ "./spec_1.js", "./spec_2.js" ].forEach( function( file ) {
  require( file );
} );
<!DOCTYPE html>
<html>
  <head>
    <meta charset="utf-8">
    <title>Test Suite</title>
    <!-- Includes the styles you need -->
    <link rel="stylesheet" href="/mota-webdevtools/index.css">
  </head>
  <body>
    <div id="qunit"></div>
    <div id="qunit-fixture"></div>
    <!-- Yes, there urls work because of a route that is added to the server when you do tools.createServer() -->
    <script src="/mota-webdevtools/index.js"></script>
    <!-- Livereload works thanks to a socket connection that is created after tools.createServer() -->
    <script src="/mota-webdevtools/livereload.js"></script>
    <script>

      motaWebDevTools.test.exportGlobals();
      // window.ROOT == window, window.ISENVNODE == false, window.QUnit == QUnit

      motaWebDevTools.test.load(); // Available on the browser side but does nothing.

      motaWebDevTools.test.loadTests( [ // Asynchronously loads some js files
        "./spec_1.js",
        "./spec_2.js"
      ] );

    </script>
  </body>
</html>

Benchmarking

var suite = tools.createBenchSuite( "Search in a string" );

suite.add( "RegExp#test", function() {
  /o/.test( "Hello World!" );
} )

.add( "String#indexOf", function() {
  "Hello World!".indexOf( "o" ) > -1;
} )

.add( "String#match", function() {
  !!"Hello World!".match( /o/ );
} )

.run();
<!DOCTYPE html>
<html>
  <head>
    <meta charset="utf-8">
    <title>Benchmark Suite</title>
  </head>
  <body>
    <!-- The output and "Run"/"Run Async" buttons will be shown in this element. -->
    <!-- Various different suites are supported. -->
    <div id="benchmark"></div>
    <!-- Yes, this url works because of a route that is added to the server when you do tools.createServer() -->
    <script src="/mota-webdevtools/index.js"></script>
    <script>

      var suite = motaWebDevTools.createBenchSuite( "Search in a string" );

      suite.add( "RegExp#test", function() {
        /o/.test( "Hello World!" );
      } )
      .add( "String#indexOf", function() {
        "Hello World!".indexOf( "o" ) > -1;
      } )
      .add( "String#match", function() {
        !!"Hello World!".match( /o/ );
      } );

    </script>
  </body>
</html>