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

bumi

v2.0.0

Published

Tools for grounding JavaScript modules from NPM to JavaScript UMD for browsers.

Downloads

7

Readme

bumi

Tools for grounding JavaScript modules from NPM to JavaScript UMD for browsers.

Installation

npm i -g bumi

How to use

bumi filename.js

For filename use snake_case or CamelCase

Later, it will generate filename.min.js which can be used for browsers.

Example

Contents of unique.js:

import uniq from "uniq";

export default function (array) {
  return uniq(array);
}

Then, run the command:

bumi unique.js

The result is a unique.min.js file which contains:

// Variable name: unique
!(function (n, e) {
  "object" == typeof exports && "undefined" != typeof module
    ? (module.exports = e())
    : "function" == typeof define && define.amd
    ? define(e)
    : ((n = " undefined" != typeof globalThis ? globalThis : n || self).unique =
        e());
})(this, function () {
  "use strict";
  var e = function (n, e, t) {
    return 0 === n.length
      ? n
      : e
      ? (t || n.sort(e),
        (function (n, e) {
          for (var t, o = 1, r = n.length, f = n[0], u = (n[0], 1); u < r; ++u)
            (t = f), e((f = n[u]), t) && (u !== o ? (n[o++] = f) : o++);
          return (n.length = o), n;
        })(n, e))
      : (t || n.sort(),
        (function (n) {
          for (
            var e = 1, t = n.length, o = n[0], r = n[0], f = 1;
            f < t;
            ++f, r = o
          )
            (r = o), (o = n[f]) !== r && (f !== e ? (n[e++] = o) : e++);
          return (n.length = e), n;
        })(n));
  };
  return function (n) {
    return e(n);
  };
});

Example of How to Use Build Results

<script src="unique.min.js"></script>
<script>
  const unique_number = unique([1, 2, 3]);
  console.log(unique_number);
</script>