Find an easy way to use `.at` and `Object.hasOwn`
See original GitHub issueThey are available on Node.js 16, but esbuild won’t polyfill for Node.js 14, we do similar thing in main
branch by using esbuild -> babel -> esbuild
. But this will slow down build process, and the core-js polyfill seems big.
npx esbuild core-js/modules/es.array.at.js --bundle
It’s ~1200 lines, we don’t it so prefect. There should be a better way.
Issue Analytics
- State:
- Created a year ago
- Comments:9 (9 by maintainers)
Top Results From Across the Web
Object.hasOwn() - JavaScript - MDN Web Docs
The Object.hasOwn() static method returns true if the specified object has the indicated property as its own property.
Read more >What is Object.hasOwn() and why should we use it over ...
JavaScript. Object.hasOwn() is a new static method which returns true if the specified object has the specified property as its own property.
Read more >Object.hasOwn() vs Object.prototype.hasOwnProperty()
So, after looking at both Object.hasOwn() and Object.hasOwnProperty() in action, they seems quite the same.. So why should we use Object.
Read more >What's the deal with Object.prototype.hasOwnProperty.call()?
Prototypal inheritance allows an object to inherit methods and properties on its prototype. It's better to understand with an example: var obj = ......
Read more >Add `Object.hasOwn` to Section 3.7 (Object.prototype methods)
Hello, it seems that Objct.hasOwn is now available in most major browsers (https://caniuse.com/mdn-javascript_builtins_object_hasown), ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
It seems the solution is not too bad #13482 All cost about 20s in both this PR and
next
branch, maybe because our source files are all small. 😄I want to try use babel api in our replaceModule plugin. Not sure how slow can it be.