Functions

@system-inc/base-foundation · 515c140 · 3 symbols

isHandlerMiddlewareConstructor(value: HandlerMiddlewareRegistration): value is Constructor<HandlerMiddleware>

View source ↗

Whether a middleware registration is a class constructor (which is resolved from the container, so it participates in DI and database attribution) rather than a plain function.

isMiddlewareConstructor(value: BaseMiddlewareRegistration): value is Constructor<BaseMiddleware>

View source ↗

Validates the contentType headers and returns the file extension.

validateAndExtractFileType(contentType: string | null, contentLength: number, options?: { allowedContentType?: string[]; disallowedFileTypes?: string[]; fileSizeLimit?: number }): { fileExt: string; fileType: string }

View source ↗