@codenameryuu/adonis-datatable
Version:
Server side datatables package for Adonis JS
21 lines (20 loc) • 1.62 kB
TypeScript
export default class Helper {
static toSnakeCase(str: string): string;
static wrapColumn(value: string, toSnackCase?: boolean): string;
static escape(value: any): any;
static extractColumnName(str: string, wantsAlias: boolean): string;
static wildcardString(str: string, wildcard: string, lowercase?: boolean): string;
static only<T>(obj: Record<string, T>, keys: string[]): Record<string, T>;
static value(defaultVal: <T extends abstract new (...args: any) => any>(arg: InstanceType<T>) => any | any, ...args: any): any;
static serializeToObject(row: Record<string, any>): Record<string, any>;
static compileContent(content: (<T extends abstract new (...args: any) => any>(row: InstanceType<T>) => string | number) | string | number, data: Record<string, any>, row: Record<string, any> | any[]): string | number;
static compileView(content: string, data: Record<string, any>): string;
static escapeHTML(html: string): string;
static getMixedValue(data: Record<string, any>, param: Record<string, any>): Record<string, any>;
static toObject(param: Record<string, any>): Record<string, any>;
static dot(object: Record<string, any>, prepend?: string): Record<string, any>;
static contains(haystack: string, needles: string | string[], ignoreCase?: boolean): boolean;
static objectIncludeIn(item: any, data: Record<string, any>): Record<string, any>;
static objectIntersectKey<T>(array: Record<string, T>, keys: string[]): Record<string, T>;
static objectReplaceRecursive(target: Record<string, any>, source: Record<string, any>): Record<string, any>;
}