mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-17 10:02:05 +00:00
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:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user