feat(Discord Node): Overhaul (#5351)

Github issue / Community forum post (link here to close automatically):

---------

Co-authored-by: Giulio Andreini <g.andreini@gmail.com>
Co-authored-by: Marcus <marcus@n8n.io>
This commit is contained in:
Michael Kret
2023-11-08 16:11:23 +02:00
committed by GitHub
parent afd637b5ea
commit 6a53c2a375
69 changed files with 6688 additions and 271 deletions

View File

@@ -294,10 +294,19 @@ export function flattenObject(data: IDataObject) {
}
/**
* Generate Paired Item Data by length of input array
* Capitalizes the first letter of a string
*
* @param {number} length
* @param {string} string The string to capitalize
*/
export function capitalize(str: string): string {
if (!str) return str;
const chars = str.split('');
chars[0] = chars[0].toUpperCase();
return chars.join('');
}
export function generatePairedItemData(length: number): IPairedItemData[] {
return Array.from({ length }, (_, item) => ({
item,