https://github.com/sagi/globalthis
A globalThis Polyfill for JavaScript Environments
https://github.com/sagi/globalthis
cloudflare globalthis javascript workers
Last synced: about 1 month ago
JSON representation
A globalThis Polyfill for JavaScript Environments
- Host: GitHub
- URL: https://github.com/sagi/globalthis
- Owner: sagi
- License: mit
- Created: 2019-06-03T10:01:05.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2023-01-03T23:17:25.000Z (about 3 years ago)
- Last Synced: 2025-04-03T22:01:51.710Z (11 months ago)
- Topics: cloudflare, globalthis, javascript, workers
- Language: JavaScript
- Size: 815 KB
- Stars: 1
- Watchers: 0
- Forks: 0
- Open Issues: 11
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# **`globalThis`** Polyfill
[`@sagi.io/globalthis`](https://www.npmjs.com/package/@sagi.io/globalthis) is
a `globalThis` polyfill that is based on [Mathias Bynens](https://mathiasbynens.be/notes/globalthis)'s' implementation.
[](https://circleci.com/gh/sagi/globalThis)
[](https://coveralls.io/github/sagi/globalThis?branch=master)
[](http://opensource.org/licenses/MIT)
[](http://npm.im/@sagi.io/globalthis)
## Usage
ESM:
~~~js
import '@sagi.io/globalthis'
~~~
CJS:
~~~js
require('@sagi.io/globalthis')
~~~
You can now access `globalThis`.