npm

Bring the best of OSS JavaScript development to your projects with npm Orgs - private packages & team management tools.Learn more »

@offirmo/globalthis-ponyfill

1.0.0 • Public • Published

globalThis ponyfill
Offirmo’s quality seal

npm badge dependencies badge bundle size badge license badge maintenance status badge

This is a trivial TypeScript-compatible globalThis ponyfill.

  • ~141b minified and gzipped
  • NO dependencies

Usage

import { getGlobalThis } from '@offirmo/globalthis-ponyfill'
 
const globalThis = getGlobalThis()

Rationale

There are existing ponyfills/polyfills out there, but they didn't work for me:

  • too complicated: mine is a single TS file of 5 lines
  • I needed TypeScript

Credits

YES I had a look at ljharb/globalThis's implementation (MIT) and started my implementation from it! Thanks a lot and all credits due!

install

npm i @offirmo/globalthis-ponyfill

Downloadsweekly downloads

0

version

1.0.0

license

Unlicense

homepage

github.com

repository

Gitgithub

last publish

collaborators

  • avatar
Report a vulnerability