SukkaW / nolyfill

Speed up your package installation process, reduce your disk usage, and extend the lifespan of your precious SSD.
MIT License
1.11k stars 15 forks source link

fix(#104): proper `function.prototype.name` implementation #106

Closed SukkaW closed 1 month ago

SukkaW commented 1 month ago

Function.prototype.name is the name of the Function.prototype. The PR replaces the implementation with a proper getter.

I simply ignore any detection (this === Function.prototype or Object.hasOwn(this, 'name')) since nolyfill already assumes the runtime has the proper implementation.

cc @jdalton