Skip to content

API Boolean

Liu.Yandong.Hanks edited this page Aug 21, 2026 · 3 revisions

Boolean

Boolean conversion plus the true and false constants.

Script API Reference

Overview

Boolean converts values using AuroraScript truthiness. It is not a mutable wrapper object; the result is always the primitive Boolean true or false.

Boolean is callable, so Boolean(value) converts a value directly.

Constructors

Boolean([value])

Parameters

Name Type Required Description
value any No Value to convert.

Returns

boolean — the truthiness of the value.

Example

return Boolean("text"); // true

Constants

Constant Type Description
Boolean.true boolean Boolean true constant.
Boolean.false boolean Boolean false constant.

Example

return Boolean.true && !Boolean.false; // true

Methods

Boolean.valueOf(value)

Parameters

Name Type Required Description
value any Yes Value to convert.

Returns

boolean — the truthiness of the value.

Example

return Boolean.valueOf(0); // false

value.toString()

Parameters

None.

Returns

string"true" or "false".

Example

return Boolean(true).toString(); // "true"

Clone this wiki locally