/** * This Source Code is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. * * Copyright (c) Infonomic Company Limited */ /** * delay in ms * @param ms * @returns */ export declare function delay(ms: number): Promise; /** * truncate * @param str * @param length * @param useWordBoundary * @returns */ export declare function truncate(str: string, length: number, useWordBoundary: boolean, useSuffix?: boolean): string; /** * Returns a hash code from a string * @param {String} input The string to hash. * @return {String} hash to string * @see http://werxltd.com/wp/2010/05/13/javascript-implementation-of-javas-string-hashcode-method/ * @see https://gist.github.com/jlevy/c246006675becc446360a798e2b2d781 */ export declare function simpleHash(input: string): string; export declare function isString(value: any): boolean; export declare function isNumber(value: any): boolean; export declare function isArray(value: any): boolean; export declare function isFunction(value: any): boolean; export declare function isObject(value: any): boolean; export declare function isEmptyObject(value: any): boolean; export declare function isNull(value: any): boolean; export declare function isUndefined(value: any): boolean; export declare function isBoolean(value: any): boolean; export declare function isRegExp(value: any): boolean; export declare function isDate(value: any): boolean; export declare function isSymbol(value: any): boolean; export declare function arrayEquals(array1: number[], array2: number[]): boolean; export declare function insertIf(condition: any, ...elements: any[]): any[]; export declare const formatDate: (value: string) => string; export declare const formatDateTime: (value: string) => string; export declare const daysRemaining: (value: string) => number | string; /** * Accept currency value in cents and convert to formatted US dollars. * @param {*} value */ export declare const formatToDollarsFromCents: (value: any) => string; export declare function formatNumber(number: number, decimalPlaces: number): string; export declare function formatFileSize(bytes: number | null | undefined, decimalPoint: number): string; /** * getRemainingTime * @param {*} value - remaining time in seconds */ export declare const getRemainingTime: (seconds: number) => { days: number; hours: number; minutes: number; seconds: number; };