docs: Update docs links for data transformation functions and ifEmpty (#7758)

Github issue / Community forum post (link here to close automatically):
This commit is contained in:
Deborah 2023-11-20 13:40:28 +00:00 committed by GitHub
parent 8d12c1ad8d
commit ad04986ce7
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 67 additions and 112 deletions

View file

@ -323,80 +323,70 @@ average.doc = {
name: 'average', name: 'average',
description: 'Returns the mean average of all values in the array.', description: 'Returns the mean average of all values in the array.',
returnType: 'number', returnType: 'number',
docURL: docURL: 'https://docs.n8n.io/code/builtin/data-transformation-functions/arrays/#array-average',
'https://docs.n8n.io/code-examples/expressions/data-transformation-functions/arrays/#array-average',
}; };
compact.doc = { compact.doc = {
name: 'compact', name: 'compact',
description: 'Removes all empty values from the array.', description: 'Removes all empty values from the array.',
returnType: 'Array', returnType: 'Array',
docURL: docURL: 'https://docs.n8n.io/code/builtin/data-transformation-functions/arrays/#array-compact',
'https://docs.n8n.io/code-examples/expressions/data-transformation-functions/arrays/#array-compact',
}; };
isEmpty.doc = { isEmpty.doc = {
name: 'isEmpty', name: 'isEmpty',
description: 'Checks if the array doesnt have any elements.', description: 'Checks if the array doesnt have any elements.',
returnType: 'boolean', returnType: 'boolean',
docURL: docURL: 'https://docs.n8n.io/code/builtin/data-transformation-functions/arrays/#array-isEmpty',
'https://docs.n8n.io/code-examples/expressions/data-transformation-functions/arrays/#array-isEmpty',
}; };
isNotEmpty.doc = { isNotEmpty.doc = {
name: 'isNotEmpty', name: 'isNotEmpty',
description: 'Checks if the array has elements.', description: 'Checks if the array has elements.',
returnType: 'boolean', returnType: 'boolean',
docURL: docURL: 'https://docs.n8n.io/code/builtin/data-transformation-functions/arrays/#array-isNotEmpty',
'https://docs.n8n.io/code-examples/expressions/data-transformation-functions/arrays/#array-isNotEmpty',
}; };
first.doc = { first.doc = {
name: 'first', name: 'first',
description: 'Returns the first element of the array.', description: 'Returns the first element of the array.',
returnType: 'Element', returnType: 'Element',
docURL: docURL: 'https://docs.n8n.io/code/builtin/data-transformation-functions/arrays/#array-first',
'https://docs.n8n.io/code-examples/expressions/data-transformation-functions/arrays/#array-first',
}; };
last.doc = { last.doc = {
name: 'last', name: 'last',
description: 'Returns the last element of the array.', description: 'Returns the last element of the array.',
returnType: 'Element', returnType: 'Element',
docURL: docURL: 'https://docs.n8n.io/code/builtin/data-transformation-functions/arrays/#array-last',
'https://docs.n8n.io/code-examples/expressions/data-transformation-functions/arrays/#array-last',
}; };
max.doc = { max.doc = {
name: 'max', name: 'max',
description: 'Gets the maximum value from a number-only array.', description: 'Gets the maximum value from a number-only array.',
returnType: 'number', returnType: 'number',
docURL: docURL: 'https://docs.n8n.io/code/builtin/data-transformation-functions/arrays/#array-max',
'https://docs.n8n.io/code-examples/expressions/data-transformation-functions/arrays/#array-max',
}; };
min.doc = { min.doc = {
name: 'min', name: 'min',
description: 'Gets the minimum value from a number-only array.', description: 'Gets the minimum value from a number-only array.',
returnType: 'number', returnType: 'number',
docURL: docURL: 'https://docs.n8n.io/code/builtin/data-transformation-functions/arrays/#array-min',
'https://docs.n8n.io/code-examples/expressions/data-transformation-functions/arrays/#array-min',
}; };
randomItem.doc = { randomItem.doc = {
name: 'randomItem', name: 'randomItem',
description: 'Returns a random element from an array.', description: 'Returns a random element from an array.',
returnType: 'Element', returnType: 'Element',
docURL: docURL: 'https://docs.n8n.io/code/builtin/data-transformation-functions/arrays/#array-randomItem',
'https://docs.n8n.io/code-examples/expressions/data-transformation-functions/arrays/#array-randomItem',
}; };
sum.doc = { sum.doc = {
name: 'sum', name: 'sum',
description: 'Returns the total sum all the values in an array of parsable numbers.', description: 'Returns the total sum all the values in an array of parsable numbers.',
returnType: 'number', returnType: 'number',
docURL: docURL: 'https://docs.n8n.io/code/builtin/data-transformation-functions/arrays/#array-sum',
'https://docs.n8n.io/code-examples/expressions/data-transformation-functions/arrays/#array-sum',
}; };
chunk.doc = { chunk.doc = {
@ -404,8 +394,7 @@ chunk.doc = {
description: 'Splits arrays into chunks with a length of `size`.', description: 'Splits arrays into chunks with a length of `size`.',
returnType: 'Array', returnType: 'Array',
args: [{ name: 'size', type: 'number' }], args: [{ name: 'size', type: 'number' }],
docURL: docURL: 'https://docs.n8n.io/code/builtin/data-transformation-functions/arrays/#array-chunk',
'https://docs.n8n.io/code-examples/expressions/data-transformation-functions/arrays/#array-chunk',
}; };
difference.doc = { difference.doc = {
@ -414,8 +403,7 @@ difference.doc = {
'Compares two arrays. Returns all elements in the base array that arent present in `arr`.', 'Compares two arrays. Returns all elements in the base array that arent present in `arr`.',
returnType: 'Array', returnType: 'Array',
args: [{ name: 'arr', type: 'Array' }], args: [{ name: 'arr', type: 'Array' }],
docURL: docURL: 'https://docs.n8n.io/code/builtin/data-transformation-functions/arrays/#array-difference',
'https://docs.n8n.io/code-examples/expressions/data-transformation-functions/arrays/#array-difference',
}; };
intersection.doc = { intersection.doc = {
@ -425,7 +413,7 @@ intersection.doc = {
returnType: 'Array', returnType: 'Array',
args: [{ name: 'arr', type: 'Array' }], args: [{ name: 'arr', type: 'Array' }],
docURL: docURL:
'https://docs.n8n.io/code-examples/expressions/data-transformation-functions/arrays/#array-intersection', 'https://docs.n8n.io/code/builtin/data-transformation-functions/arrays/#array-intersection',
}; };
merge.doc = { merge.doc = {
@ -434,8 +422,7 @@ merge.doc = {
'Merges two Object-arrays into one array by merging the key-value pairs of each element.', 'Merges two Object-arrays into one array by merging the key-value pairs of each element.',
returnType: 'array', returnType: 'array',
args: [{ name: 'arr', type: 'Array' }], args: [{ name: 'arr', type: 'Array' }],
docURL: docURL: 'https://docs.n8n.io/code/builtin/data-transformation-functions/arrays/#array-merge',
'https://docs.n8n.io/code-examples/expressions/data-transformation-functions/arrays/#array-merge',
}; };
pluck.doc = { pluck.doc = {
@ -448,8 +435,7 @@ pluck.doc = {
{ name: '...' }, { name: '...' },
{ name: 'fieldNameN?', type: 'string' }, { name: 'fieldNameN?', type: 'string' },
], ],
docURL: docURL: 'https://docs.n8n.io/code/builtin/data-transformation-functions/arrays/#array-pluck',
'https://docs.n8n.io/code-examples/expressions/data-transformation-functions/arrays/#array-pluck',
}; };
renameKeys.doc = { renameKeys.doc = {
@ -465,8 +451,7 @@ renameKeys.doc = {
{ name: 'fromN?', type: 'string' }, { name: 'fromN?', type: 'string' },
{ name: 'toN?', type: 'string' }, { name: 'toN?', type: 'string' },
], ],
docURL: docURL: 'https://docs.n8n.io/code/builtin/data-transformation-functions/arrays/#array-renameKeys',
'https://docs.n8n.io/code-examples/expressions/data-transformation-functions/arrays/#array-renameKeys',
}; };
smartJoin.doc = { smartJoin.doc = {
@ -478,8 +463,7 @@ smartJoin.doc = {
{ name: 'keyField', type: 'string' }, { name: 'keyField', type: 'string' },
{ name: 'nameField', type: 'string' }, { name: 'nameField', type: 'string' },
], ],
docURL: docURL: 'https://docs.n8n.io/code/builtin/data-transformation-functions/arrays/#array-smartJoin',
'https://docs.n8n.io/code-examples/expressions/data-transformation-functions/arrays/#array-smartJoin',
}; };
union.doc = { union.doc = {
@ -487,8 +471,7 @@ union.doc = {
description: 'Concatenates two arrays and then removes duplicates.', description: 'Concatenates two arrays and then removes duplicates.',
returnType: 'Array', returnType: 'Array',
args: [{ name: 'arr', type: 'Array' }], args: [{ name: 'arr', type: 'Array' }],
docURL: docURL: 'https://docs.n8n.io/code/builtin/data-transformation-functions/arrays/#array-union',
'https://docs.n8n.io/code-examples/expressions/data-transformation-functions/arrays/#array-union',
}; };
unique.doc = { unique.doc = {
@ -496,8 +479,7 @@ unique.doc = {
description: 'Remove duplicates from an array. ', description: 'Remove duplicates from an array. ',
returnType: 'Element', returnType: 'Element',
aliases: ['removeDuplicates'], aliases: ['removeDuplicates'],
docURL: docURL: 'https://docs.n8n.io/code/builtin/data-transformation-functions/arrays/#array-unique',
'https://docs.n8n.io/code-examples/expressions/data-transformation-functions/arrays/#array-unique',
}; };
export const arrayExtensions: ExtensionMap = { export const arrayExtensions: ExtensionMap = {

View file

@ -220,24 +220,21 @@ endOfMonth.doc = {
name: 'endOfMonth', name: 'endOfMonth',
returnType: 'Date', returnType: 'Date',
description: 'Transforms a date to the last possible moment that lies within the month.', description: 'Transforms a date to the last possible moment that lies within the month.',
docURL: docURL: 'https://docs.n8n.io/code/builtin/data-transformation-functions/dates/#date-endOfMonth',
'https://docs.n8n.io/code-examples/expressions/data-transformation-functions/dates/#date-endOfMonth',
}; };
isDst.doc = { isDst.doc = {
name: 'isDst', name: 'isDst',
returnType: 'boolean', returnType: 'boolean',
description: 'Checks if a Date is within Daylight Savings Time.', description: 'Checks if a Date is within Daylight Savings Time.',
docURL: docURL: 'https://docs.n8n.io/code/builtin/data-transformation-functions/dates/#date-isDst',
'https://docs.n8n.io/code-examples/expressions/data-transformation-functions/dates/#date-isDst',
}; };
isWeekend.doc = { isWeekend.doc = {
name: 'isWeekend', name: 'isWeekend',
returnType: 'boolean', returnType: 'boolean',
description: 'Checks if the Date falls on a Saturday or Sunday.', description: 'Checks if the Date falls on a Saturday or Sunday.',
docURL: docURL: 'https://docs.n8n.io/code/builtin/data-transformation-functions/dates/#date-isWeekend',
'https://docs.n8n.io/code-examples/expressions/data-transformation-functions/dates/#date-isWeekend',
}; };
beginningOf.doc = { beginningOf.doc = {
@ -245,8 +242,7 @@ beginningOf.doc = {
description: 'Transform a Date to the start of the given time period. Default unit is `week`.', description: 'Transform a Date to the start of the given time period. Default unit is `week`.',
returnType: 'Date', returnType: 'Date',
args: [{ name: 'unit?', type: 'DurationUnit' }], args: [{ name: 'unit?', type: 'DurationUnit' }],
docURL: docURL: 'https://docs.n8n.io/code/builtin/data-transformation-functions/dates/#date-beginningOf',
'https://docs.n8n.io/code-examples/expressions/data-transformation-functions/dates/#date-beginningOf',
}; };
extract.doc = { extract.doc = {
@ -254,8 +250,7 @@ extract.doc = {
description: 'Extracts the part defined in `datePart` from a Date. Default unit is `week`.', description: 'Extracts the part defined in `datePart` from a Date. Default unit is `week`.',
returnType: 'number', returnType: 'number',
args: [{ name: 'datePart?', type: 'DurationUnit' }], args: [{ name: 'datePart?', type: 'DurationUnit' }],
docURL: docURL: 'https://docs.n8n.io/code/builtin/data-transformation-functions/dates/#date-extract',
'https://docs.n8n.io/code-examples/expressions/data-transformation-functions/dates/#date-extract',
}; };
format.doc = { format.doc = {
@ -263,8 +258,7 @@ format.doc = {
description: 'Formats a Date in the given structure.', description: 'Formats a Date in the given structure.',
returnType: 'string', returnType: 'string',
args: [{ name: 'fmt', type: 'TimeFormat' }], args: [{ name: 'fmt', type: 'TimeFormat' }],
docURL: docURL: 'https://docs.n8n.io/code/builtin/data-transformation-functions/dates/#date-format',
'https://docs.n8n.io/code-examples/expressions/data-transformation-functions/dates/#date-format',
}; };
isBetween.doc = { isBetween.doc = {
@ -275,8 +269,7 @@ isBetween.doc = {
{ name: 'date1', type: 'Date|string' }, { name: 'date1', type: 'Date|string' },
{ name: 'date2', type: 'Date|string' }, { name: 'date2', type: 'Date|string' },
], ],
docURL: docURL: 'https://docs.n8n.io/code/builtin/data-transformation-functions/dates/#date-isBetween',
'https://docs.n8n.io/code-examples/expressions/data-transformation-functions/dates/#date-isBetween',
}; };
isInLast.doc = { isInLast.doc = {
@ -287,8 +280,7 @@ isInLast.doc = {
{ name: 'n', type: 'number' }, { name: 'n', type: 'number' },
{ name: 'unit?', type: 'DurationUnit' }, { name: 'unit?', type: 'DurationUnit' },
], ],
docURL: docURL: 'https://docs.n8n.io/code/builtin/data-transformation-functions/dates/#date-isInLast',
'https://docs.n8n.io/code-examples/expressions/data-transformation-functions/dates/#date-isInLast',
}; };
minus.doc = { minus.doc = {
@ -299,8 +291,7 @@ minus.doc = {
{ name: 'n', type: 'number' }, { name: 'n', type: 'number' },
{ name: 'unit?', type: 'DurationUnit' }, { name: 'unit?', type: 'DurationUnit' },
], ],
docURL: docURL: 'https://docs.n8n.io/code/builtin/data-transformation-functions/dates/#date-minus',
'https://docs.n8n.io/code-examples/expressions/data-transformation-functions/dates/#date-minus',
}; };
plus.doc = { plus.doc = {
@ -311,8 +302,7 @@ plus.doc = {
{ name: 'n', type: 'number' }, { name: 'n', type: 'number' },
{ name: 'unit?', type: 'DurationUnit' }, { name: 'unit?', type: 'DurationUnit' },
], ],
docURL: docURL: 'https://docs.n8n.io/code/builtin/data-transformation-functions/dates/#date-plus',
'https://docs.n8n.io/code-examples/expressions/data-transformation-functions/dates/#date-plus',
}; };
export const dateExtensions: ExtensionMap = { export const dateExtensions: ExtensionMap = {

View file

@ -66,7 +66,7 @@ ifEmpty.doc = {
{ name: 'value', type: 'any' }, { name: 'value', type: 'any' },
{ name: 'defaultValue', type: 'any' }, { name: 'defaultValue', type: 'any' },
], ],
docURL: 'https://docs.n8n.io/code-examples/expressions/data-transformation-functions/#if-empty', docURL: 'https://docs.n8n.io/code/builtin/convenience',
}; };
export const extendedFunctions = { export const extendedFunctions = {

View file

@ -44,32 +44,28 @@ ceil.doc = {
name: 'ceil', name: 'ceil',
description: 'Rounds up a number to a whole number.', description: 'Rounds up a number to a whole number.',
returnType: 'number', returnType: 'number',
docURL: docURL: 'https://docs.n8n.io/code/builtin/data-transformation-functions/numbers/#number-ceil',
'https://docs.n8n.io/code-examples/expressions/data-transformation-functions/numbers/#number-ceil',
}; };
floor.doc = { floor.doc = {
name: 'floor', name: 'floor',
description: 'Rounds down a number to a whole number.', description: 'Rounds down a number to a whole number.',
returnType: 'number', returnType: 'number',
docURL: docURL: 'https://docs.n8n.io/code/builtin/data-transformation-functions/numbers/#number-floor',
'https://docs.n8n.io/code-examples/expressions/data-transformation-functions/numbers/#number-floor',
}; };
isEven.doc = { isEven.doc = {
name: 'isEven', name: 'isEven',
description: 'Returns true if the number is even. Only works on whole numbers.', description: 'Returns true if the number is even. Only works on whole numbers.',
returnType: 'boolean', returnType: 'boolean',
docURL: docURL: 'https://docs.n8n.io/code/builtin/data-transformation-functions/numbers/#number-isEven',
'https://docs.n8n.io/code-examples/expressions/data-transformation-functions/numbers/#number-isEven',
}; };
isOdd.doc = { isOdd.doc = {
name: 'isOdd', name: 'isOdd',
description: 'Returns true if the number is odd. Only works on whole numbers.', description: 'Returns true if the number is odd. Only works on whole numbers.',
returnType: 'boolean', returnType: 'boolean',
docURL: docURL: 'https://docs.n8n.io/code/builtin/data-transformation-functions/numbers/#number-isOdd',
'https://docs.n8n.io/code-examples/expressions/data-transformation-functions/numbers/#number-isOdd',
}; };
format.doc = { format.doc = {
@ -81,8 +77,7 @@ format.doc = {
{ name: 'locales?', type: 'LanguageCode' }, { name: 'locales?', type: 'LanguageCode' },
{ name: 'options?', type: 'FormatOptions' }, { name: 'options?', type: 'FormatOptions' },
], ],
docURL: docURL: 'https://docs.n8n.io/code/builtin/data-transformation-functions/numbers/#number-format',
'https://docs.n8n.io/code-examples/expressions/data-transformation-functions/numbers/#number-format',
}; };
round.doc = { round.doc = {
@ -91,8 +86,7 @@ round.doc = {
'Returns the value of a number rounded to the nearest whole number, unless a decimal place is specified. Defaults to 0 decimal places if no argument is given.', 'Returns the value of a number rounded to the nearest whole number, unless a decimal place is specified. Defaults to 0 decimal places if no argument is given.',
returnType: 'number', returnType: 'number',
args: [{ name: 'decimalPlaces?', type: 'number' }], args: [{ name: 'decimalPlaces?', type: 'number' }],
docURL: docURL: 'https://docs.n8n.io/code/builtin/data-transformation-functions/numbers/#number-round',
'https://docs.n8n.io/code-examples/expressions/data-transformation-functions/numbers/#number-round',
}; };
export const numberExtensions: ExtensionMap = { export const numberExtensions: ExtensionMap = {

View file

@ -84,8 +84,7 @@ isEmpty.doc = {
name: 'isEmpty', name: 'isEmpty',
description: 'Checks if the Object has no key-value pairs.', description: 'Checks if the Object has no key-value pairs.',
returnType: 'boolean', returnType: 'boolean',
docURL: docURL: 'https://docs.n8n.io/code/builtin/data-transformation-functions/objects/#object-isEmpty',
'https://docs.n8n.io/code-examples/expressions/data-transformation-functions/objects/#object-isEmpty',
}; };
isNotEmpty.doc = { isNotEmpty.doc = {
@ -93,15 +92,14 @@ isNotEmpty.doc = {
description: 'Checks if the Object has key-value pairs.', description: 'Checks if the Object has key-value pairs.',
returnType: 'boolean', returnType: 'boolean',
docURL: docURL:
'https://docs.n8n.io/code-examples/expressions/data-transformation-functions/objects/#object-isNotEmpty', 'https://docs.n8n.io/code/builtin/data-transformation-functions/objects/#object-isNotEmpty',
}; };
compact.doc = { compact.doc = {
name: 'compact', name: 'compact',
description: 'Removes empty values from an Object.', description: 'Removes empty values from an Object.',
returnType: 'boolean', returnType: 'boolean',
docURL: docURL: 'https://docs.n8n.io/code/builtin/data-transformation-functions/objects/#object-compact',
'https://docs.n8n.io/code-examples/expressions/data-transformation-functions/objects/#object-compact',
}; };
urlEncode.doc = { urlEncode.doc = {
@ -109,7 +107,7 @@ urlEncode.doc = {
description: 'Transforms an Object into a URL parameter list. Only top-level keys are supported.', description: 'Transforms an Object into a URL parameter list. Only top-level keys are supported.',
returnType: 'string', returnType: 'string',
docURL: docURL:
'https://docs.n8n.io/code-examples/expressions/data-transformation-functions/objects/#object-urlEncode', 'https://docs.n8n.io/code/builtin/data-transformation-functions/objects/#object-urlEncode',
}; };
hasField.doc = { hasField.doc = {
@ -117,8 +115,7 @@ hasField.doc = {
description: 'Checks if the Object has a given field. Only top-level keys are supported.', description: 'Checks if the Object has a given field. Only top-level keys are supported.',
returnType: 'boolean', returnType: 'boolean',
args: [{ name: 'fieldName', type: 'string' }], args: [{ name: 'fieldName', type: 'string' }],
docURL: docURL: 'https://docs.n8n.io/code/builtin/data-transformation-functions/objects/#object-hasField',
'https://docs.n8n.io/code-examples/expressions/data-transformation-functions/objects/#object-hasField',
}; };
removeField.doc = { removeField.doc = {
@ -127,7 +124,7 @@ removeField.doc = {
returnType: 'object', returnType: 'object',
args: [{ name: 'key', type: 'string' }], args: [{ name: 'key', type: 'string' }],
docURL: docURL:
'https://docs.n8n.io/code-examples/expressions/data-transformation-functions/objects/#object-removeField', 'https://docs.n8n.io/code/builtin/data-transformation-functions/objects/#object-removeField',
}; };
removeFieldsContaining.doc = { removeFieldsContaining.doc = {
@ -137,7 +134,7 @@ removeFieldsContaining.doc = {
returnType: 'object', returnType: 'object',
args: [{ name: 'value', type: 'string' }], args: [{ name: 'value', type: 'string' }],
docURL: docURL:
'https://docs.n8n.io/code-examples/expressions/data-transformation-functions/objects/#object-removeFieldsContaining', 'https://docs.n8n.io/code/builtin/data-transformation-functions/objects/#object-removeFieldsContaining',
}; };
keepFieldsContaining.doc = { keepFieldsContaining.doc = {
@ -146,7 +143,7 @@ keepFieldsContaining.doc = {
returnType: 'object', returnType: 'object',
args: [{ name: 'value', type: 'string' }], args: [{ name: 'value', type: 'string' }],
docURL: docURL:
'https://docs.n8n.io/code-examples/expressions/data-transformation-functions/objects/#object-keepFieldsContaining', 'https://docs.n8n.io/code/builtin/data-transformation-functions/objects/#object-keepFieldsContaining',
}; };
export const objectExtensions: ExtensionMap = { export const objectExtensions: ExtensionMap = {

View file

@ -355,7 +355,7 @@ removeMarkdown.doc = {
description: 'Removes Markdown formatting from a string.', description: 'Removes Markdown formatting from a string.',
returnType: 'string', returnType: 'string',
docURL: docURL:
'https://docs.n8n.io/code-examples/expressions/data-transformation-functions/strings/#string-removeMarkdown', 'https://docs.n8n.io/code/builtin/data-transformation-functions/strings/#string-removeMarkdown',
}; };
removeTags.doc = { removeTags.doc = {
@ -363,15 +363,14 @@ removeTags.doc = {
description: 'Removes tags, such as HTML or XML, from a string.', description: 'Removes tags, such as HTML or XML, from a string.',
returnType: 'string', returnType: 'string',
docURL: docURL:
'https://docs.n8n.io/code-examples/expressions/data-transformation-functions/strings/#string-removeTags', 'https://docs.n8n.io/code/builtin/data-transformation-functions/strings/#string-removeTags',
}; };
toDate.doc = { toDate.doc = {
name: 'toDate', name: 'toDate',
description: 'Converts a string to a date.', description: 'Converts a string to a date.',
returnType: 'Date', returnType: 'Date',
docURL: docURL: 'https://docs.n8n.io/code/builtin/data-transformation-functions/strings/#string-toDate',
'https://docs.n8n.io/code-examples/expressions/data-transformation-functions/strings/#string-toDate',
}; };
toFloat.doc = { toFloat.doc = {
@ -380,7 +379,7 @@ toFloat.doc = {
returnType: 'number', returnType: 'number',
aliases: ['toDecimalNumber'], aliases: ['toDecimalNumber'],
docURL: docURL:
'https://docs.n8n.io/code-examples/expressions/data-transformation-functions/strings/#string-toDecimalNumber', 'https://docs.n8n.io/code/builtin/data-transformation-functions/strings/#string-toDecimalNumber',
}; };
toInt.doc = { toInt.doc = {
@ -389,8 +388,7 @@ toInt.doc = {
returnType: 'number', returnType: 'number',
args: [{ name: 'radix?', type: 'number' }], args: [{ name: 'radix?', type: 'number' }],
aliases: ['toWholeNumber'], aliases: ['toWholeNumber'],
docURL: docURL: 'https://docs.n8n.io/code/builtin/data-transformation-functions/strings/#string-toInt',
'https://docs.n8n.io/code-examples/expressions/data-transformation-functions/strings/#string-toInt',
}; };
toSentenceCase.doc = { toSentenceCase.doc = {
@ -398,7 +396,7 @@ toSentenceCase.doc = {
description: 'Formats a string to sentence case. Example: "This is a sentence".', description: 'Formats a string to sentence case. Example: "This is a sentence".',
returnType: 'string', returnType: 'string',
docURL: docURL:
'https://docs.n8n.io/code-examples/expressions/data-transformation-functions/strings/#string-toSentenceCase', 'https://docs.n8n.io/code/builtin/data-transformation-functions/strings/#string-toSentenceCase',
}; };
toSnakeCase.doc = { toSnakeCase.doc = {
@ -406,7 +404,7 @@ toSnakeCase.doc = {
description: 'Formats a string to snake case. Example: "this_is_snake_case".', description: 'Formats a string to snake case. Example: "this_is_snake_case".',
returnType: 'string', returnType: 'string',
docURL: docURL:
'https://docs.n8n.io/code-examples/expressions/data-transformation-functions/strings/#string-toSnakeCase', 'https://docs.n8n.io/code/builtin/data-transformation-functions/strings/#string-toSnakeCase',
}; };
toTitleCase.doc = { toTitleCase.doc = {
@ -414,7 +412,7 @@ toTitleCase.doc = {
description: 'Formats a string to title case. Example: "This Is a Title".', description: 'Formats a string to title case. Example: "This Is a Title".',
returnType: 'string', returnType: 'string',
docURL: docURL:
'https://docs.n8n.io/code-examples/expressions/data-transformation-functions/strings/#string-toTitleCase', 'https://docs.n8n.io/code/builtin/data-transformation-functions/strings/#string-toTitleCase',
}; };
urlEncode.doc = { urlEncode.doc = {
@ -423,7 +421,7 @@ urlEncode.doc = {
args: [{ name: 'entireString?', type: 'boolean' }], args: [{ name: 'entireString?', type: 'boolean' }],
returnType: 'string', returnType: 'string',
docURL: docURL:
'https://docs.n8n.io/code-examples/expressions/data-transformation-functions/strings/#string-urlEncode', 'https://docs.n8n.io/code/builtin/data-transformation-functions/strings/#string-urlEncode',
}; };
urlDecode.doc = { urlDecode.doc = {
@ -432,7 +430,7 @@ urlDecode.doc = {
'Decodes a URL-encoded string. It decodes any percent-encoded characters in the input string, and replaces them with their original characters.', 'Decodes a URL-encoded string. It decodes any percent-encoded characters in the input string, and replaces them with their original characters.',
returnType: 'string', returnType: 'string',
docURL: docURL:
'https://docs.n8n.io/code-examples/expressions/data-transformation-functions/strings/#string-urlDecode', 'https://docs.n8n.io/code/builtin/data-transformation-functions/strings/#string-urlDecode',
}; };
replaceSpecialChars.doc = { replaceSpecialChars.doc = {
@ -440,30 +438,28 @@ replaceSpecialChars.doc = {
description: 'Replaces non-ASCII characters in a string with an ASCII representation.', description: 'Replaces non-ASCII characters in a string with an ASCII representation.',
returnType: 'string', returnType: 'string',
docURL: docURL:
'https://docs.n8n.io/code-examples/expressions/data-transformation-functions/strings/#string-replaceSpecialChars', 'https://docs.n8n.io/code/builtin/data-transformation-functions/strings/#string-replaceSpecialChars',
}; };
length.doc = { length.doc = {
name: 'length', name: 'length',
description: 'Returns the character count of a string.', description: 'Returns the character count of a string.',
returnType: 'number', returnType: 'number',
docURL: 'https://docs.n8n.io/code-examples/expressions/data-transformation-functions/strings', docURL: 'https://docs.n8n.io/code/builtin/data-transformation-functions/strings',
}; };
isDomain.doc = { isDomain.doc = {
name: 'isDomain', name: 'isDomain',
description: 'Checks if a string is a domain.', description: 'Checks if a string is a domain.',
returnType: 'boolean', returnType: 'boolean',
docURL: docURL: 'https://docs.n8n.io/code/builtin/data-transformation-functions/strings/#string-isDomain',
'https://docs.n8n.io/code-examples/expressions/data-transformation-functions/strings/#string-isDomain',
}; };
isEmail.doc = { isEmail.doc = {
name: 'isEmail', name: 'isEmail',
description: 'Checks if a string is an email.', description: 'Checks if a string is an email.',
returnType: 'boolean', returnType: 'boolean',
docURL: docURL: 'https://docs.n8n.io/code/builtin/data-transformation-functions/strings/#string-isEmail',
'https://docs.n8n.io/code-examples/expressions/data-transformation-functions/strings/#string-isEmail',
}; };
isNumeric.doc = { isNumeric.doc = {
@ -471,23 +467,21 @@ isNumeric.doc = {
description: 'Checks if a string only contains digits.', description: 'Checks if a string only contains digits.',
returnType: 'boolean', returnType: 'boolean',
docURL: docURL:
'https://docs.n8n.io/code-examples/expressions/data-transformation-functions/strings/#string-isNumeric', 'https://docs.n8n.io/code/builtin/data-transformation-functions/strings/#string-isNumeric',
}; };
isUrl.doc = { isUrl.doc = {
name: 'isUrl', name: 'isUrl',
description: 'Checks if a string is a valid URL.', description: 'Checks if a string is a valid URL.',
returnType: 'boolean', returnType: 'boolean',
docURL: docURL: 'https://docs.n8n.io/code/builtin/data-transformation-functions/strings/#string-isUrl',
'https://docs.n8n.io/code-examples/expressions/data-transformation-functions/strings/#string-isUrl',
}; };
isEmpty.doc = { isEmpty.doc = {
name: 'isEmpty', name: 'isEmpty',
description: 'Checks if a string is empty.', description: 'Checks if a string is empty.',
returnType: 'boolean', returnType: 'boolean',
docURL: docURL: 'https://docs.n8n.io/code/builtin/data-transformation-functions/strings/#string-isEmpty',
'https://docs.n8n.io/code-examples/expressions/data-transformation-functions/strings/#string-isEmpty',
}; };
isNotEmpty.doc = { isNotEmpty.doc = {
@ -495,7 +489,7 @@ isNotEmpty.doc = {
description: 'Checks if a string has content.', description: 'Checks if a string has content.',
returnType: 'boolean', returnType: 'boolean',
docURL: docURL:
'https://docs.n8n.io/code-examples/expressions/data-transformation-functions/strings/#string-isNotEmpty', 'https://docs.n8n.io/code/builtin/data-transformation-functions/strings/#string-isNotEmpty',
}; };
extractEmail.doc = { extractEmail.doc = {
@ -503,7 +497,7 @@ extractEmail.doc = {
description: 'Extracts an email from a string. Returns undefined if none is found.', description: 'Extracts an email from a string. Returns undefined if none is found.',
returnType: 'string', returnType: 'string',
docURL: docURL:
'https://docs.n8n.io/code-examples/expressions/data-transformation-functions/strings/#string-extractEmail', 'https://docs.n8n.io/code/builtin/data-transformation-functions/strings/#string-extractEmail',
}; };
extractDomain.doc = { extractDomain.doc = {
@ -512,7 +506,7 @@ extractDomain.doc = {
'Extracts a domain from a string containing a valid URL. Returns undefined if none is found.', 'Extracts a domain from a string containing a valid URL. Returns undefined if none is found.',
returnType: 'string', returnType: 'string',
docURL: docURL:
'https://docs.n8n.io/code-examples/expressions/data-transformation-functions/strings/#string-extractDomain', 'https://docs.n8n.io/code/builtin/data-transformation-functions/strings/#string-extractDomain',
}; };
extractUrl.doc = { extractUrl.doc = {
@ -520,7 +514,7 @@ extractUrl.doc = {
description: 'Extracts a URL from a string. Returns undefined if none is found.', description: 'Extracts a URL from a string. Returns undefined if none is found.',
returnType: 'string', returnType: 'string',
docURL: docURL:
'https://docs.n8n.io/code-examples/expressions/data-transformation-functions/strings/#string-extractUrl', 'https://docs.n8n.io/code/builtin/data-transformation-functions/strings/#string-extractUrl',
}; };
hash.doc = { hash.doc = {
@ -528,8 +522,7 @@ hash.doc = {
description: 'Returns a string hashed with the given algorithm. Default algorithm is `md5`.', description: 'Returns a string hashed with the given algorithm. Default algorithm is `md5`.',
returnType: 'string', returnType: 'string',
args: [{ name: 'algo?', type: 'Algorithm' }], args: [{ name: 'algo?', type: 'Algorithm' }],
docURL: docURL: 'https://docs.n8n.io/code/builtin/data-transformation-functions/strings/#string-hash',
'https://docs.n8n.io/code-examples/expressions/data-transformation-functions/strings/#string-hash',
}; };
quote.doc = { quote.doc = {
@ -537,8 +530,7 @@ quote.doc = {
description: 'Returns a string wrapped in the quotation marks. Default quotation is `"`.', description: 'Returns a string wrapped in the quotation marks. Default quotation is `"`.',
returnType: 'string', returnType: 'string',
args: [{ name: 'mark?', type: 'string' }], args: [{ name: 'mark?', type: 'string' }],
docURL: docURL: 'https://docs.n8n.io/code/builtin/data-transformation-functions/strings/#string-quote',
'https://docs.n8n.io/code-examples/expressions/data-transformation-functions/strings/#string-quote',
}; };
export const stringExtensions: ExtensionMap = { export const stringExtensions: ExtensionMap = {