/// import fs from 'fs'; import { PascalCase } from 'type-fest'; import { CamelCasedProps, PascalCasedProps } from '../modules/interface'; export declare function deepClone(obj: T): T; /** * return variable real type * @param {any} obj input variable */ export declare function getRealType(obj: T): string; /** * is array * @param obj object */ export declare function isArray(obj: T[] | T): obj is T[]; /** * is positive integer(正整数) * @param obj object */ export declare function isPositiveInteger(value: string | number): boolean; /** * is number(数字) * @param obj object */ export declare function isNumber(value: string | number): boolean; /** * is object * @param obj object */ export declare function isObject(obj: T): obj is T; /** * iterate object or array * @param obj object or array * @param iterator iterator function */ export declare function _forEach( obj: T[], iterator: (val: T, index: number, data?: T[]) => any, ): void; export declare function _forEach( obj: T, iterator: (val: any, index: string, data?: T) => any, ): void; export declare function isPrimitive(obj: any): boolean; export declare function deepEqual(obj1: any, obj2: any): boolean; /** * flatter request parameter * @param source target object or array */ export declare function flatten(source: T | T[]): Record; export declare function uniqueArray(arr: T[]): T[]; export declare function camelCaseProps(obj: T): CamelCasedProps; export declare function pascalCase(str: T): PascalCase; export declare function pascalCaseProps(obj: T): PascalCasedProps; export declare function strip(num: number, precision?: number): number; export interface TraverseDirOptions { depthLimit?: number; rootDepth?: number; filter?: (item: { path: string; stats: fs.Stats }) => boolean; nodir?: boolean; nofile?: boolean; traverseAll?: boolean; } export declare function traverseDirSync( dir: string, opts?: TraverseDirOptions, ls?: { path: string; stats: fs.Stats; }[], ): { path: string; stats: fs.Stats; }[]; export declare function getToday(date?: Date): string; export declare function getYestoday(): string; export declare const randomId: (len?: number) => string; export declare const getQcsResourceId: ( service: string, region: string, uin: string, suffix: string, ) => string; /** * hmacSha1 加密HmacSHA1 * @param text 加密文本 * @param key 加密密钥 * @returns */ export declare const hmacSha1: (text: string, key: string) => string; /** * getYunTiApiUrl 查询云梯API地址 * @returns 云梯API地址 */ export declare const getYunTiApiUrl: () => string; export * from './case'; import { caseForObject, isType } from './case'; export { caseForObject, isType };