@stemy/backend 3.5.16 → 3.6.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/utils.d.ts CHANGED
@@ -5,7 +5,7 @@ import { Server } from "socket.io";
5
5
  import { GridFSBucket, ObjectId } from "mongodb";
6
6
  import { Document } from "mongoose";
7
7
  import { Readable, ReadableOptions } from "stream";
8
- import { IAssetImageParams, IAssetMeta, IClientSocket, ParamResolver, Type } from "./common-types";
8
+ import { IAssetImageParams, IAssetMeta, IClientSocket, IFileType, ParamResolver, Type } from "./common-types";
9
9
  export interface IDIContainers {
10
10
  appContainer: DependencyContainer;
11
11
  }
@@ -61,6 +61,7 @@ export declare function multiSubscription(...subscriptions: Subscription[]): Sub
61
61
  export declare function observableFromFunction(callbackFunc: () => any): Observable<any>;
62
62
  export declare function padLeft(value: any, count?: number, padWith?: string): string;
63
63
  export declare function padRight(value: any, count?: number, padWith?: string): string;
64
+ export declare function camelCaseToDash(str: string): string;
64
65
  export declare function deleteFromBucket(bucket: GridFSBucket, fileId: ObjectId): Promise<string>;
65
66
  export declare function filter<T>(obj: T, predicate: FilterPredicate): Partial<T>;
66
67
  export declare function copy<T>(obj: T): T;
@@ -105,8 +106,10 @@ export interface IJsonColors {
105
106
  export declare function colorize(input: any, color: ConsoleColor): string;
106
107
  export declare function jsonHighlight(input: string | object, colorOptions?: IJsonColors): string;
107
108
  export declare function replaceSpecialChars(str: string, to?: string): string;
109
+ export declare function regexEscape(str: string): string;
108
110
  export declare function flatten(arr: any[]): any[];
109
111
  export declare function wrapError(e: any, message: string, httpCode?: number): Error;
110
112
  export declare function prepareUrl(ending?: string): ParamResolver;
111
113
  export declare const prepareUrlSlash: ParamResolver;
112
114
  export declare const prepareUrlEmpty: ParamResolver;
115
+ export declare function fileTypeFromBuffer(buffer: Buffer): Promise<IFileType>;