mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-17 10:02:05 +00:00
⚡ Simplify code
This commit is contained in:
@@ -293,11 +293,14 @@ export const split = (subject: string): string[] =>
|
|||||||
.map(s => s.replace(/\\([\s\S])/gm, ($0, $1) => $1))
|
.map(s => s.replace(/\\([\s\S])/gm, ($0, $1) => $1))
|
||||||
;
|
;
|
||||||
|
|
||||||
const userBaseUri = (str?: string) => {
|
const userBaseUri = (uri?: string) => {
|
||||||
if (str === undefined) {
|
if (uri === undefined) {
|
||||||
return str;
|
return uri;
|
||||||
}
|
}
|
||||||
let end = str.length;
|
|
||||||
for (; end > 0 && str[end - 1] === '/'; --end) {}
|
if (uri.endsWith('/')) {
|
||||||
return end < str.length ? str.substring(0, end) : str;
|
return uri.slice(0, -1);
|
||||||
|
}
|
||||||
|
|
||||||
|
return uri;
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -95,7 +95,7 @@ export interface IRowResponse{
|
|||||||
metadata: [
|
metadata: [
|
||||||
{
|
{
|
||||||
key: string,
|
key: string,
|
||||||
name: string
|
name: string,
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
results: IRow[];
|
results: IRow[];
|
||||||
|
|||||||
Reference in New Issue
Block a user