ngx2-pipes
Version:
Angular pipes library
41 lines (40 loc) • 2.37 kB
TypeScript
export declare type CollectionPredicate = (item?: any, index?: number, collection?: any[]) => boolean;
export declare function isUndefined(value: any): value is undefined;
export declare function isNull(value: any): value is null;
export declare function isNumber(value: any): value is number;
export declare function isNumberFinite(value: any): value is number;
export declare function isPositive(value: number): boolean;
export declare function isInteger(value: number): boolean;
export declare function isNil(value: any): value is null | undefined;
export declare function isString(value: any): value is string;
export declare function isObject(value: any): boolean;
export declare function isArray(value: any): boolean;
export declare function isFunction(value: any): boolean;
export declare function toDecimal(value: number, decimal: number): number;
export declare function upperFirst(value: string): string;
export declare function createRound(method: string): Function;
export declare function leftPad(str: string, len?: number, ch?: any): string;
export declare function rightPad(str: string, len?: number, ch?: any): string;
export declare function toString(value: number | string): string;
export declare function pad(str: string, len?: number, ch?: any): string;
export declare function flatten(input: any[], index?: number): any[];
export declare function getProperty(value: {
[key: string]: any;
}, key: string): any;
export declare function sum(input: Array<number>, initial?: number): number;
export declare function shuffle(input: any): any;
export declare function deepIndexOf(collection: any[], value: any): number;
export declare function deepEqual(a: any, b: any): boolean;
export declare function isDeepObject(object: any): any;
export declare function wrapDeep(object: any): DeepWrapper;
export declare function unwrapDeep(object: any): any;
export declare class DeepWrapper {
data: any;
__isDeepObject__: boolean;
constructor(data: any);
}
export declare function count(input: any): any;
export declare function empty(input: any): any;
export declare function every(input: any, predicate: CollectionPredicate): any;
export declare function takeUntil(input: any[], predicate: CollectionPredicate): any;
export declare function takeWhile(input: any[], predicate: CollectionPredicate): any;