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 -
Returns whether this JSAny? is an
instanceof
the constructor that is defined byconstructorName
, which is looked up in the globalContext. -
isA<
T extends JSAny?> () → bool -
Whether this JSAny? is the actual JS type that is declared by
T
. -
typeofEquals(
String typeString) → bool -
Returns whether the result of
typeof
on this JSAny? istypeString
.