Skip to content

Boolean#

Boolean.isEmpty()#

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

Syntax: Boolean.isEmpty()

Returns: Boolean

Source: Custom n8n functionality

Examples:

1
2
// bool = true
bool.isEmpty() // => false
1
2
// bool = false
bool.isEmpty() // => false
1
2
// 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:

1
true.toNumber() //=> 1
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:

1
2
// bool = true
bool.toString() //=> 'true'
1
2
// bool = false
bool.toString() //=> 'false'
This page was