utils: {
argv: { [key: string]: string };
arrayStartingMatch: (a: any[], b: any[]) => boolean;
arrayUnique: (arr: any[]) => any[];
collapseObjectToArray: (obj: Record<string, any>) => boolean | any[];
deepCopy: <T>(obj: T) => T;
ensureNoTsHeaderOrSpecFiles: (files: string[]) => string[];
eventLoopDelay: (iterations?: number) => Promise<number>;
fileUtils: {
createDirSafely: (dir: string) => string;
createFileSafely: (
file: string,
data: string | ArrayBufferView<ArrayBufferLike>,
overwrite?: boolean,
) => string;
createLinkfileSafely: (filePath: string, type: string) => string;
createSymlinkSafely: (destination: string, source: string) => string;
dirExists: (dir: string) => boolean;
fileExists: (file: string) => boolean;
removeLinkfileSafely: (filePath: string) => string;
};
filterObjectForLogging: (
params: Record<string, any>,
) => Record<string, any>;
filterResponseForLogging: (
response: Record<string, any>,
) => { [key: string]: any };
getExternalIPAddress: () => string;
hashMerge: (
a: Record<string, any>,
b: Record<string, any>,
arg?: Record<string, any>,
) => { [key: string]: any };
isPlainObject: (o: any) => boolean;
isRunning: (pid: number) => boolean;
parseCookies: (
req: { headers: { [key: string]: string | string[] } },
) => object;
parseHeadersForClientAddress: (
headers: Record<string, string | string[]>,
) => { ip: string; port: string | number };
parseIPv6URI: (addr: string) => { host: string; port: number };
replaceDistWithSrc: (f: string) => string;
safeGlobSync: (match: string, args?: IOptions) => string[];
sleep: (time: number) => Promise<void>;
sortGlobalMiddleware: (
globalMiddlewareList: any[],
middleware: { [key: string]: any },
) => void;
sourceRelativeLinkPath: (
linkFile: string,
pluginPaths: string[],
) => string | boolean;
} = ...
Type declaration
argv: { [key: string]: string }
arrayStartingMatch: (a: any[], b: any[]) => boolean
arrayUnique: (arr: any[]) => any[]
collapseObjectToArray: (obj: Record<string, any>) => boolean | any[]
deepCopy: <T>(obj: T) => T
eventLoopDelay: (iterations?: number) => Promise<number>
fileUtils: {
createDirSafely: (dir: string) => string;
createFileSafely: (
file: string,
data: string | ArrayBufferView<ArrayBufferLike>,
overwrite?: boolean,
) => string;
createLinkfileSafely: (filePath: string, type: string) => string;
createSymlinkSafely: (destination: string, source: string) => string;
dirExists: (dir: string) => boolean;
fileExists: (file: string) => boolean;
removeLinkfileSafely: (filePath: string) => string;
}
createDirSafely: (dir: string) => string
createFileSafely: (
file: string,
data: string | ArrayBufferView<ArrayBufferLike>,
overwrite?: boolean,
) => string
createLinkfileSafely: (filePath: string, type: string) => string
createSymlinkSafely: (destination: string, source: string) => string
dirExists: (dir: string) => boolean
fileExists: (file: string) => boolean
removeLinkfileSafely: (filePath: string) => string
filterObjectForLogging: (params: Record<string, any>) => Record<string, any>
filterResponseForLogging: (response: Record<string, any>) => { [key: string]: any }
getExternalIPAddress: () => string
hashMerge: (
a: Record<string, any>,
b: Record<string, any>,
arg?: Record<string, any>,
) => { [key: string]: any }
isPlainObject: (o: any) => boolean
isRunning: (pid: number) => boolean
parseCookies: (req: { headers: { [key: string]: string | string[] } }) => object
parseIPv6URI: (addr: string) => { host: string; port: number }
replaceDistWithSrc: (f: string) => string
safeGlobSync: (match: string, args?: IOptions) => string[]
sleep: (time: number) => Promise<void>
sortGlobalMiddleware: (globalMiddlewareList: any[], middleware: { [key: string]: any }) => void
sourceRelativeLinkPath: (linkFile: string, pluginPaths: string[]) => string | boolean
Utility functions for Actionhero