JSAnyUtilityExtension extension

Common utility functions that are useful for any JS value.

on

Methods

dartify() Object?
Effectively the inverse of jsify, dartify Takes a JavaScript object, and converts it to a Dart based object. Only JS primitives, arrays, or 'map' like JS objects are supported.
instanceof(JSFunction constructor) bool
Returns whether this JSAny? is an instanceof constructor.
instanceOfString(String constructorName) bool
Like instanceof, but only takes a String for the constructor name, which is then looked up in the globalContext.
typeofEquals(String typeString) bool
Returns whether the result of typeof on this JSAny? is typeString.