Number#
Number.abs()#
Description: Returns the number’s absolute value, i.e. removes any minus sign
Syntax: Number.abs()
Returns: Number
Source: Custom n8n functionality
Examples:
1 2 | |
Number.ceil()#
Description: Rounds the number up to the next whole number
Syntax: Number.ceil()
Returns: Number
Source: Custom n8n functionality
Examples:
1 2 | |
Number.floor()#
Description: Rounds the number down to the nearest whole number
Syntax: Number.floor()
Returns: Number
Source: Custom n8n functionality
Examples:
1 2 | |
Number.format()#
Description: Returns a formatted string representing the number. Useful for formatting for a specific language or currency. The same as Intl.NumberFormat().
Syntax: Number.format(locale?, options?)
Returns: String
Source: Custom n8n functionality
Parameters:
locale(String) - optional - A locale tag for formatting the number, e.g.fr-FR,en-GB,pr-BRoptions(Object) - optional - Configuration options for number formatting. More info
Examples:
1 2 | |
1 2 | |
Number.isEmpty()#
Description: Returns false for all numbers. Returns true for null.
Syntax: Number.isEmpty()
Returns: Boolean
Source: Custom n8n functionality
Examples:
1 2 | |
1 2 | |
1 2 | |
Number.isEven()#
Description: Returns true if the number is even. Throws an error if the number isn’t a whole number.
Syntax: Number.isEven()
Returns: Boolean
Source: Custom n8n functionality
Examples:
1 2 | |
Number.isInteger()#
Description: Returns true if the number is a whole number
Syntax: Number.isInteger()
Returns: Boolean
Source: Custom n8n functionality
Examples:
1 2 | |
1 2 | |
Number.isOdd()#
Description: Returns true if the number is odd. Throws an error if the number isn’t a whole number.
Syntax: Number.isOdd()
Returns: Boolean
Source: Custom n8n functionality
Examples:
1 2 | |
Number.round()#
Description: Returns the number rounded to the nearest whole number (or specified number of decimal places)
Syntax: Number.round(decimalPlaces?)
Returns: Number
Source: Custom n8n functionality
Parameters:
decimalPlaces(Number) - optional - The number of decimal places to round to
Examples:
1 2 | |
1 2 3 | |
Number.toBoolean()#
Description: Converts the number to a boolean value. 0 becomes false; everything else becomes true.
Syntax: Number.toBoolean()
Source: Custom n8n functionality
Examples:
1 2 | |
1 2 | |
Number.toDateTime()#
Description: Converts a numerical timestamp into a DateTime. The format of the timestamp must be specified if it’s not in milliseconds. Uses the time zone in n8n (or in the workflow’s settings).
Syntax: Number.toDateTime(format?)
Returns: DateTime
Source: Custom n8n functionality
Parameters:
format(String) - optional - The type of timestamp to convert. Options arems(for Unix timestamp in milliseconds),s(for Unix timestamp in seconds) orexcel(for days since 1900).
Examples:
1 2 | |
1 2 | |
1 2 | |
Number.toLocaleString()#
Description: Returns a localised string representing the number, i.e. in the language and format corresponding to its locale. Defaults to the system's locale if none specified.
Syntax: Number.toLocaleString(locales?, options?)
Returns: String
Source: JavaScript function
Parameters:
locales(String|Array) - optional - The locale to assign, e.g. ‘en-GB’ for British English or ‘pt-BR’ for Brazilian Portuguese. See full list (unofficial). Also accepts an array of locales. Defaults to the system locale if not specified. options(Object) - optional - An object with formatting options
Examples:
1 2 | |
1 2 | |
1 2 | |
Number.toString()#
Description: Converts the number to a simple textual representation. For more formatting options, see toLocaleString().
Syntax: Number.toString(radix?)
Returns: String
Source: JavaScript function
Parameters:
radix(Number) - optional - The base to use. Must be an integer between 2 and 36. E.g. base2is binary and base16is hexadecimal.
Examples:
1 2 | |
1 2 | |