JSAnyOperatorExtension extension

General-purpose JavaScript operators.

Indexing operators ([], []=) should be declared through operator overloading instead like:

external operator int [](int key);

All operators in this extension shall accept and return only JS types.

on

Properties

isTruthy bool
The result of !![this] in JavaScript.
no setter
not bool
The result of ![this] in JavaScript.
no setter

Methods

add(JSAny? any) JSAny
The result of this + any in JavaScript.
and(JSAny? any) JSAny?
The result of this && any in JavaScript.
divide(JSAny? any) JSAny
The result of this / any in JavaScript.
equals(JSAny? any) JSBoolean
The result of this == any in JavaScript.
exponentiate(JSAny? any) JSAny
The result of this ** any in JavaScript.
greaterThan(JSAny? any) JSBoolean
The result of this > any in JavaScript.
greaterThanOrEqualTo(JSAny? any) JSBoolean
The result of this >= any in JavaScript.
lessThan(JSAny? any) JSBoolean
The result of this < any in JavaScript.
lessThanOrEqualTo(JSAny? any) JSBoolean
The result of this <= any in JavaScript.
modulo(JSAny? any) JSAny
The result of this % any in JavaScript.
multiply(JSAny? any) JSAny
The result of this * any in JavaScript.
notEquals(JSAny? any) JSBoolean
The result of this != any in JavaScript.
or(JSAny? any) JSAny?
The result of this || any in JavaScript.
strictEquals(JSAny? any) JSBoolean
The result of this === any in JavaScript.
strictNotEquals(JSAny? any) JSBoolean
The result of this !== any in JavaScript.
subtract(JSAny? any) JSAny
The result of this - any in JavaScript.
unsignedRightShift(JSAny? any) JSNumber
The result of this >>> any in JavaScript.