Spackle
Polyfills for older hardware.

Dusty hardware deserves nice things too. Spackle adds newer JavaScript features to older devices and WebViews, with less work for their CPUs and garbage collectors.

Test this device Compare Quick start Read the paper

Less mess, less waiting

A polyfill adds a JavaScript feature an older browser is missing. Many polyfill libraries route calls through shared helpers, which can be slow. Spackle keeps each polyfill self-contained to reduce work and temporary allocations on older engines.

How deep each call goes Object.assign Array.from Map URLSearchParams nested helper functions 0 Object.assign Array.from Map URLSearchParams nested helper functions 0
spackle vs core-js

on 2015-era Chromium, up to

Front-end stress test on Chromium 41, 64 MB heap, one CPU core. How we measured

Install

A core-js alternative for the APIs Spackle supports. Current release: 0.1.0-alpha.9. Still alpha, so check what's covered first.

1

Install it

npm install @shim-works/spackle
2

Import Spackle before anything else, at your app's entry point

import '@shim-works/spackle';
import App from './App';
3

Tell your bundler to stop adding core-js

// babel.config.js
['@babel/preset-env', {
  targets: { chrome: '38', safari: '7.1' },
  useBuiltIns: false,
}]

Using SWC or Vite? The README has those.

How this was tested

24 Chromium WebViews from 41–150, Safari 7.1–10, and a real app on a 2017 LG TV. The numbers and raw data are all in the paper.

1,357 JS compliance tests run in the actual WebViews · methods and raw results in the paper

Test this device Compare How we know