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

mastic-filler

v1.0.1

Published

Automagically test your browser and fetches only the polyfills you need

Readme

🔮 mastic-filler 🌟

Automatically tests your browser for the features you want, and then fetches the polyfills

How to use it

First, install mastic-filler as one of your dependencies :

npm i mastic-filler --save

You'll need to provide three things to mastic-filler :

  • a list of polyfills to test
  • an url to fetch the polyfills if needed
  • a list of scripts to load and execute when the browser is polyfilled and ready to rock
import filler from 'mastic-filler';
import { Promise } from 'mastic-polyfills';

filler({
	polyfills: [Promise],
	url: 'http://url.of.your.mastic.server',
	scripts: ['/assets/app.js']
});

filler() options

polyfills

Array of Polyfill objects

The list of polyfills the fill script will test and fetch if needed. You can import and use the ones from mastic-polyfills, but you can also make it work with your hand-made polyfills :

import filler from 'mastic-filler';
import Polyfill, { Promise } from 'mastic-polyfills';

const isFeatureSupported = typeof feature !== 'undefined';
const myBundleName = 'feature-polyfill';
const myPolyfill = new Polyfill(isFeatureSupported, customBundleName);

filler({
	polyfills: [Promise, customPolyfill],
	url: 'http://url.of.your.mastic.server',
	scripts: ['/assets/app.js']
});

For more information on polyfills objects, see the mastic-polyfills readme.

url

String

The url of the server serving your polyfills bundles. See the mastic-node-server readme for more information.

scripts

Array of String

To be able to polyfill your browser before your app code runs, mastic-filler must control the script loading and executing order. It means you have to remove the scripts tags from your pages, and provide the urls to mastic-filler. It can be done with a global variable or anything you want.

- <script src="/assets/app.js"></script>
+ <script>window.scripts=['/assets/app.js']></script>
filler({
	polyfills: [Promise],
	url: 'http://url.of.your.mastic.server',
	scripts: window.scripts
});

You can improve the loading speed of your scripts in the browsers supporting resources preload (mainly Chrome for the moment) by adding some lines in the header of your page :

<link rel="preload" href="/assets/app.js" as="script">

This will preload the scripts you specify without executing them, so when mastic-filler will want to execute them they will already be in loaded in cache.