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

bandler

v1.0.4

Published

Lightweight Javascript CJS and ES6 bundler

Readme

bandler

The simple Javascript module bundler. Capable of bundling simple CJS or ESM modules.

Why did I create this?

At work we use webpack and I use rollup for personal use. Up to this point, much of the bundling process is rather magical. You tell them where the entry is, designate output, and poof! Your code is automagically bundled.

I created this project mainly to teach myself how bundler works. My hope is that others could understand how bundlers work from this project.

This project is inspired by minipack and wbpck-bundler, both of which accomplishes similar things. In case you're wondering, the main difference is that minipack bundles ES6 and wbpck-bundler bundles CJS. Bandler attempts to bundle both CJS and ES6 without additional config from user.

With that being said, this project is not production-ready. This is not a webpack/ rollup replacement. This is a toy bundler 🎁. You have been warned.

Code explanation

I wrote an article explaining the code. You should check it out!

Usage

Run node ./bandler.js /direction/to/entry.js

  1. Install dependencies: npm i

  2. This project has 2 examples: ./example1/entry.js uses ES6 modules and ./example2/entry.js uses CJS modules

  3. Run either entries, for example: node ./bandler.js ./example2/entry.js

It will output the bundled code on terminal, such as this:

(function(modules){
  const require = id => {
    const {factory, map} = modules[id];
    const localRequire = requireDeclarationName => require(map[requireDeclarationName]);
    const module = {exports: {}};

    factory(module, localRequire);
    return module.exports;
  }
  require(0);
})({0: {
    factory: (module, require) => {
      const module1 = require('./module1.js');

      module1();

    },
    map: {"./module1.js":1}
  },1: {
    factory: (module, require) => {
      "use strict";

      var module1 = function module1() {
      console.log("Hello from module1!");
  };

      module.exports = module1;
    },
    map: {}
}})

The code above is a bundled code from example2 entry and all its dependencies. Copy/paste the code on your browser console to see the code above works (disclaimer: it is just console.log).

Contributing

If you think this project could be made clearer/ better/ found bugs, please feel free to submit PRs.