UNPKG

ems-web-app-utils

Version:

Utility methods that are intended for use in Angular.io [web applications developed by Educational Media Solutions](https://github.com/spencech/ems-web-app-template)

41 lines (40 loc) 2.42 kB
import * as i0 from "@angular/core"; export declare function alphabetize(...parameters: any[]): any; export declare function clone(obj: any): any; export declare function convertToEST(date: string): string; export declare function dateStrings(date?: Date): { year: number; month: string; date: string; time: string; seconds: string; }; export declare function delay(method: () => void, ms?: number): number; export declare function download(content: string, name: string, extension?: string): void; export declare function empty(e: any): boolean; export declare function enumKeys<O extends object, K extends keyof O = keyof O>(obj: O): K[]; export declare function enumValues<O extends object, K extends keyof O = keyof O>(obj: O): any[]; export declare function falsy(e: any): boolean; export declare function focus(selector: string): number; export declare function getLargestRemainder(values: number[], desiredSum: number): number[]; export declare function getparams(requestedProperty?: string): any; export declare function isset(e: any): boolean; export declare function kebab(e: string): string; export declare function paginate(method: (offset: number, limit: number) => any, offset: number, limit: number, key: string, output?: any[], callback?: (allRows: any[], newRows: any[]) => void, prevResolve?: (result: any) => void): Promise<any>; export declare function prepareSearchString(value: string): string; export declare function replaceItem(array: any[], item: any, key?: string, position?: string): any; export declare function sleep(duration?: number): Promise<any>; export declare function snakecase(e: string): string; export declare function tick(returnValue?: any): Promise<any>; export declare function timestamp(date?: Date, includeTime?: boolean): string; export declare function trace(...parameters: any[]): void; export declare function trim(e: string): string; export declare function truthy(e: any): boolean; export declare function validateEmail(email: string | null): RegExpMatchArray | null; export declare function viewport(el: HTMLElement, percentVisible?: number): boolean; export declare function password(length: number): string; export declare class UtilsModule { static ɵfac: i0.ɵɵFactoryDeclaration<UtilsModule, never>; static ɵmod: i0.ɵɵNgModuleDeclaration<UtilsModule, never, never, never>; static ɵinj: i0.ɵɵInjectorDeclaration<UtilsModule>; }