JSAnyUtilityExtension extension
Common utility functions that are useful for any JavaScript value.
- on
Methods
-
dartify(
) → Object? - Converts a JavaScript value to the Dart equivalent if possible.
-
instanceof(
JSFunction constructor) → bool -
Whether this
JSAny?
is aninstanceof
constructor
. -
instanceOfString(
String constructorName) → bool -
Whether this
JSAny?
is aninstanceof
the constructor that is defined byconstructorName
, which is looked up in the globalContext. -
isA<
T extends JSAny?> () → bool -
Whether this
JSAny?
is an instance of the JavaScript type that is declared byT
. -
typeofEquals(
String typeString) → bool -
Whether the result of
typeof
on thisJSAny?
istypeString
.