Closed calebmsword closed 2 weeks ago
In regards to the benchmark UI updates:
How to get lodash from CDN in web worker: import('https://cdn.jsdelivr.net/npm/lodash@4.17.21/+esm')
Clone CDN: https://cdn.jsdelivr.net/npm/clone@2.1.1/clone.min.js
es-toolkit CDN: https://es-toolkit.slash.page/usage.html#browsers
The recent PR implemented this issue.
Implemented in PR 37:
Update isTypedArray so it queries for method available in original ES6 specificationIt was fine how it was, no need to change it.Next PR should handle all of the followingImplemented in PR 38:instanceof
usagesinstanceof
in my javascript-notes repository. Use a variation ofisInstance
function from there in place of allinstanceof
uses. Consider return an object containing the verified value and a boolean if you can find a way to make the returned value typed as an instance of the constuctor with some TypeScript jank.letCustomizerThrow
optionThe rest of these should each be their own individual PR:
instanceof
instead of tags to type-check things in fastTypeChecking mode. My experiments suggest that it is considerably faster this way.Remove CloneDeepWarning and use simple strings instead. Throw errors if uncaught errors are found. I left it the way it is. It works and it's not a big problem.Nice-to-haves:
Instead of declaring variables in processQueue, create a classThis would overcomplicate things. Implementing the previous two points solved my problems (mostly).QueueItemStatus
that contains the status of the clone of a particular value. Create methods which modify the state based on results from handleCustomizer, handleCloningMethods, handleNativeTypes, etc.and queueItemStatusto each function internally.