Files
Kartik Balasubramanian 96e6ba167d Revamp the data section of n8n docs (#4077)
Co-authored-by: cubic-dev-ai[bot] <191113872+cubic-dev-ai[bot]@users.noreply.github.com>
2026-02-25 14:30:33 +00:00

1.2 KiB
Raw Permalink Blame History

Boolean

Boolean.isEmpty()

Description: Returns false for all booleans. Returns true for null.

Syntax: Boolean.isEmpty()

Returns: Boolean

Source: Custom n8n functionality

Examples:

// bool = true
bool.isEmpty() // => false
// bool = false
bool.isEmpty() // => false
// bool = null
bool.isEmpty() // => true

Boolean.toNumber()

Description: Converts true to 1 and false to 0

Syntax: Boolean.toNumber()

Returns: Number

Source: Custom n8n functionality

Examples:

true.toNumber() //=> 1
false.toNumber() //=> 0

Boolean.toString()

Description: Converts true to the string true and false to the string false

Syntax: Boolean.toString()

Returns: String

Source: JavaScript function

Examples:

// bool = true
bool.toString() //=> 'true'
// bool = false
bool.toString() //=> 'false'