ObjectTag
enum ObjectTag
objectToString returns strings like "[object Array]"; this enum gives those strings names, so a comparison reads as ObjectTag.ARRAY rather than as a literal that a typo can quietly break.
Several guards in the library are built on it — it is how isRegExp and isFunction recognise a value that crossed a frame boundary, where instanceof no longer holds.
Examples
Shape
objectToString([]) === ObjectTag.ARRAY; // => true
objectToString(null) === ObjectTag.NULL; // => true
See also
Source
23 September 2026
This documentation was generated with AI (Claude) from the library's source code.