pkgjs / parseargs

Polyfill of `util.parseArgs()`
Apache License 2.0
122 stars 10 forks source link

fix(runtime): support runtimes without `global` #158

Closed kisaragi-hiu closed 1 month ago

kisaragi-hiu commented 1 month ago

Fixes #157. This makes this library / polyfill usable on gjs as well as any other standards compliant runtime that doesn't refer to the global object as global.

I also added a short comment in the copied internal/primordials.js to note that this modification has been made so that the header comment remains accurate.

kisaragi-hiu commented 1 month ago

(On the topic of #154, I agree to license this under MIT or Apache 2.0 up to the maintainers' discretion.)