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

boostify

v0.0.20

Published

**Free & Open Source** - No license required.

Readme

Boostify JS

Free & Open Source - No license required.

Boostify is a lightweight JavaScript library that improves website performance by deferring third-party scripts and loading resources on demand.

Why Boostify?

Third-party scripts (Google Analytics, Facebook Pixel, Hotjar, etc.) block your main thread and slow down your site. Boostify loads them in the background after your page is interactive.

Installation

npm

npm install boostify
import Boostify from 'boostify';

const bstf = new Boostify({ debug: true });

CDN

<script src="https://unpkg.com/boostify@latest/dist/Boostify.umd.js"></script>
<script>
    const bstf = new Boostify({ debug: true });
</script>

Quick Start: Load Analytics Without Blocking

Step 1: Mark your scripts

Change type="text/javascript" to type="text/boostify":

<script type="text/boostify" src="https://www.googletagmanager.com/gtag/js?id=G-XXXXX"></script>
<script type="text/boostify">
    window.dataLayer = window.dataLayer || [];
    window.gtag = function(){dataLayer.push(arguments);}
    window.gtag('js', new Date());
    window.gtag('config', 'G-XXXXX');
</script>

Step 2: Initialize and load

const bstf = new Boostify({ debug: true });

bstf.onload({
    worker: true,  // Load via proxy (recommended)
    callback: (result) => {
        console.log('Scripts loaded!', result);
    }
});

That's it. Your analytics load in the background without blocking your page.

Debug Mode

When debug: true, you'll see colorful logs in your console with emojis:

| Event | Emoji | Color | |-------|-------|-------| | Boostify init | 🚀 | Purple gradient | | OnLoad | ⚡ | Purple/violet | | Click | 👆 | Pink/coral | | Scroll | 📜 | Green/turquoise | | Observer | 👁️ | Cyan/blue | | Inactivity | 💤 | Pink/yellow | | Script loaded | 📦 | Bright green | | Style loaded | 🎨 | Pink |

Recommendation: Use Google Tag Manager

Instead of multiple scripts, use GTM as a single container:

<script type="text/boostify" src="https://www.googletagmanager.com/gtm.js?id=GTM-XXXXX"></script>

Then add all your tags (Facebook Pixel, Hotjar, HubSpot, etc.) inside GTM. One proxy request, everything works normally.

Features

Trigger Events

| Method | Description | |--------|-------------| | bstf.onload() | Defer third-party scripts until page is interactive | | bstf.scroll() | Fire callback when user scrolls to a distance | | bstf.click() | Fire callback on element click | | bstf.observer() | Fire callback when element enters viewport | | bstf.inactivity() | Fire callback when user is inactive |

Content Injection

| Method | Description | |--------|-------------| | bstf.loadScript() | Dynamically inject JavaScript | | bstf.loadStyle() | Dynamically inject CSS | | bstf.videoPlayer() | Inject HTML5 video player | | bstf.videoEmbed() | Inject YouTube/Vimeo embed |

Examples

Load scripts on scroll

bstf.scroll({
    distance: 300,
    callback: async () => {
        await bstf.loadScript({
            url: 'https://example.com/library.js',
            appendTo: 'body'
        });
    }
});

Load scripts on click

bstf.click({
    element: document.getElementById('load-chat'),
    callback: async () => {
        await bstf.loadScript({
            url: 'https://example.com/chat-widget.js',
            appendTo: 'body'
        });
    }
});

Load when element is visible

bstf.observer({
    element: document.querySelector('.lazy-section'),
    callback: async () => {
        await bstf.loadStyle({
            url: 'https://example.com/section-styles.css',
            appendTo: 'head'
        });
    }
});

Detect user inactivity

bstf.inactivity({
    idleTime: 5000,
    name: 'my-inactivity',
    callback: () => {
        console.log('User has been inactive for 5 seconds');
    }
});

Proxy: Supported Services

When using worker: true, these services load through Boostify's proxy:

  • Google Tag Manager
  • Google Analytics
  • Facebook Pixel
  • Microsoft Clarity
  • Hotjar
  • LinkedIn Insight
  • TikTok Analytics
  • HubSpot
  • jsDelivr, unpkg, cdnjs

Services not listed? Use worker: false (still deferred, just not proxied) or request the domain.

Documentation

Full documentation at boostifyjs.com

Support


Changelog

[0.0.18] - 2026-01-31

Changed

  • Library is now free and open source (no license required)
  • Added worker option to onload() for proxy-based loading
  • Added Web Worker support for background script fetching
  • Callback now receives detailed result object (loadTime, method, scripts, etc.)
  • Renamed destroyNoMatterWhat() to destroyAll()

[0.0.17] - 2025-08-15

Changed

  • Library Validation

[0.0.16] - 2025-08-15

Changed

  • Enhanced inactivity detection with dual-mode support (user idle/native idle)
  • Added maxTime parameter for better idle timeout control
  • Breaking: destroyinactivity() now requires event name parameter

Improved

  • Event listeners now use passive mode for better performance
  • More robust timer cleanup with centralized management

[0.0.15] - 2025-08-07

Changed

  • Fix autoplay true/false in videoplayer

[0.0.14] - 2025-06-18

Changed

  • Refactored event handling
  • Added user inactivity detection feature

[0.0.13] - 2024-04-11

Changed

[0.0.12] - 2024-04-04

Changed

  • Updated package.json to resolve Netlify build issues