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

jsboost

v2.10.12

Published

A tiny library that extends the capability of javascript

Downloads

322

Readme

JS Boost

This library is a toolset that contains many different individual tools for developers to handle their project easier! However, since that the tools within the library are independent to each other, developers must select the tools they need and import them on their own! Their will be no central export mechanism that will collect everything together.

Use in native browser environment

All the tools can be accessed via JSDeliver. Developers can import the library on their own. Let's take Base64 for example! Base64 lib is locate at [root]/base64.esm.js. Developers can use following line to import this lib.

import * as Base64 from "https://cdn.jsdelivr.net/gh/JCloudYu/jsboost/base64.esm.js";

Note that the whole module registered in npm is browser compatible. So you can use following line if you want to install and control the version via npm.

import * as Base64 from "./node_modules/jsboost/base64.esm.js";

Use in NodeJS environment

Since that this library is completely written using es module syntax, using this library in NodeJS environment is a little bit tricky. Please follow the following steps to install and use this library!

  1. Install the package via following line.
    npm install jsboost
  2. Download the following loader script from here and name it as loader.mjs
  3. You can use this line
    import * as Base64 from "//jsboost/base64.esm.js";
    or this line
    import * as Base64 from "/node_modules/jsboost/base64.esm.js";
    in your code to import the tool you want ( Let's still take Base64 for example ).
  4. Run the script using following command
    node --experimental-modules --loader ./loader.mjs [PATH_TO_YOUR_BOOT_SCRIPT]

The loader script is used to tell the NodeJS environment to load the scripts ended with .esm.js as es modules not CommonJS modules. The reason why I'm not using .mjs is that I want to make the scripts to be directly identified by web browsers without the need to add additional configuration to make the server respond correct content-type header. 'cause it will be difficult to do that if you're not hosting your own web server!

Tool List

  • /version.esm.js
    A library that can parse semver compatible strings and compare the priorities among them.

  • /throttled-queue.esm.js
    A library that help developers to solve the rancing conditions among the asynchronous operations.

  • /base64.esm.js
    The library that can generate and parse strings encoded as base64 or base64url format

  • /base32.esm.js
    The library that can generate and parse strings encoded as base32hex format

  • /dom-event-emitter.esm.js
    An event emitter that provides interface that is similar to DOM Event object

  • /event-emitter.esm.js
    An implementation of NodeJS styled EventEmitter

  • /http-cookies.esm.js
    A library that allows developers to generate and parse raw cookies

  • /utf8string.esm.js
    A library that provides conversion between utf16 string (js string) and utf8 string

  • /web/load-module.esm.js
    A tiny function that provides a polyfill of Dynamic Import

  • /web/load-resource.esm.js
    A tiny function that allows developers to load batches of resources asynchronously.