Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

globalthis-polyfill

polyfill13.3kMIT1.0.0

Polyfill foe globalThis

global, globalThis, polyfill

readme

Polyfill for globalThis

license: MIT gitlab package health

Introduction

Adds support for globalThis for old browsers and old NodeJS.

Requirements

No requirements. This should work on any version of JavaScript.

Installation

Using NPM

install size publish size

$ npm install globalthis-polyfill
import 'globalthis-polyfill' // for ES2015 | ESNext
// or
require ('globalthis-polyfill') // for Node12 | CommonJS

Using HTML script tag

minified minified + gzip dependency count

<script src="https://cdn.jsdelivr.net/npm/globalthis-polyfill/index.min.js"></script>