Registry / data / polyfills-db

polyfills-db

JSON →
library3.0.0jsnpmunverified

A database of browser polyfill features, version 3.0.0, released as needed. Provides structured metadata about which browsers support each feature and which modules/files implement it. Supports runtime JS polyfills, recast-based JS transpilation, and postcss-based CSS transpilation. Key differentiator: centralized polyfill data for multiple transpilation targets, manually maintained with community contributions. Release cadence: irregular, stable.

npm install polyfills-db
INSTALL
IMPORT
SIG · POLYFILLS-DB
P
polyfills-db
datajavascriptv3.0.0
Install
Import
Disk
Pass rate
0/ 6
Env Coverage0 / 6
glibc
1822
musl
1822
Install & Compatibility
Where this runs
tested against v? · npm install
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
node 18226 runs
build_error
glibc
node 18226 runs
build_error
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

polyfills-db
import polyfillsDB from 'polyfills-db'
const polyfillsDB = require('polyfills-db')
Default import is supported. ESM-only since v3. CJS require() will not work.
data
import { data } from 'polyfills-db'
const { data } = require('polyfills-db')
Named export for the raw database object. ESM-only.
features
import { features } from 'polyfills-db'
import features from 'polyfills-db'
Named export, not default. List of feature keys.
browsers
import { browsers } from 'polyfills-db'
Named export for browser support matrix.

Shows basic usage: import database, list features, and check browser support.

import polyfillsDB, { data, features, browsers } from 'polyfills-db'; // Log all feature keys console.log(features); // Check browser support for a feature const feature = 'es6-array-from'; if (data[feature]) { console.log(`Browsers supporting ${feature}:`, data[feature].browsers); } // List available browsers console.log('Browsers:', browsers); // The database is a plain object; iterate features for (const feat of features) { console.log(feat, data[feat].polyfills); }
Debug
Known issues
breakingpolyfills-db v3 is ESM-only; require() throws ERR_REQUIRE_ESM.
fix
Use import syntax or dynamic import().
affects: >=3.0
deprecatedThe data format changed in v3: previously flat arrays now nested objects.
fix
Update to access data[feature].browsers and data[feature].polyfills.
affects: >=3.0
gotchaThe 'regenerator' feature includes 'es7-async-fn'; do not use both or runtime duplication occurs.
fix
When using regenerator, omit es7-async-fn from polyfill list.
affects: *
gotchaManually maintained; browser support data may be outdated for recent browser versions.
fix
Cross-check with caniuse.com or MDN for latest data.
affects: *
deprecatedVersion 2.x used CJS; v3 drops CJS support entirely.
fix
Node.js v12+ supports ESM; add 'type':'module' to package.json.
affects: >=3.0
Errors
Common errors & fixes
Error [ERR_REQUIRE_ESM]: require() of ES Module /path/to/polyfills-db not supported.
Using require() with v3 ESM package.
fix
Switch to import: import polyfillsDB from 'polyfills-db'
TypeError: Cannot read property 'browsers' of undefined
Accessing data[feature] where feature key does not exist in the database.
fix
Check the feature exists in the features array before accessing data[feature].browsers.
SyntaxError: Unexpected token 'export'
Node.js version <12 without ESM support, or missing 'type':'module' in package.json.
fix
Update Node.js to >=12 and add 'type':'module' to your package.json.
Upgrade
Version history
3.0.0latest on npm
Audit
Dependencies

No dependency data recorded yet.

Agent activity
4 hits · last 30 days
node
4
Resources
polyfills-db — npm install polyfills-db · libregistry