You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// Common stuff that works:
Object.prototype.toString.call(new Array())
// [Object Array]
Object.prototype.toString.call(new Date())
// [Object Date]
// Map and Set don't work:
Object.prototype.toString.call(new Set())
String(new Set())
// [Object object] but should be [Object Set]
Object.prototype.toString.call(new Map())
String(new Map())
// [Object object] but should be [Object Map]
This self-identification of constructors in JS is used quite frequently. If it is incorrect hacks have to be used.
The text was updated successfully, but these errors were encountered:
Extracted from #29 (comment)
Just FYI, there is a similar issue in React Native's runtime: facebook/react-native#19594
This self-identification of constructors in JS is used quite frequently. If it is incorrect hacks have to be used.
The text was updated successfully, but these errors were encountered: