export declare enum justOperator { Greater = ">", Greaterequal = ">=", Less = "<", Lessequal = "<=", Equal = "=" } /** * Answer Status enum : "failed" indicates the function called isn't working or invalid input */ export declare enum AnswerStatus { Success = "success", Failed = "failed" } /** * Answer format { status: AnswerStatus, detail: string } */ export interface IAnswer { status: AnswerStatus; detail: string; } /** * @description Unknow type detective, 未知类型侦探 2.1 */ export declare class JustDetective { constructor(); /** * 未知类型探测器 * @param toCheckData 待检查数据 * @param toOpFunction 处理数据的函数 * @param signal 出错位置 /producerpath/valuename */ static detect: (toCheckData: any, toOpFunction: any, signal?: string | null | undefined) => void; /** * * @param str * @param reg */ static isMatchRegex: (str: string, reg: any) => boolean; /** * Simplified Unknown value detective * @param toCheckData */ static simpleDetect(toCheckData: any): boolean; /** * @param toReplace 待替换字段 * @param replacer 被替换字段 * @param signal 出错位置 /producerpath/valuename * @description 未知类型替代器(指定字段) */ static nullReplace: (toReplace: any, replacer: any, signal?: string | null | undefined) => any; /** * @param obj 解读对象 * @description 递归解读器, 将对象包括其子对象、数组、属性中全部的未知类型转换成null值, 或者去除。目前版本为去除 */ static recursionDecipher: (obj: any) => void; } /** * @description a tool to convert string to string array values */ export declare class JustConcatter { private inputType; private outputType; /** * @param toConcat 被拼接字符串 * @param splitter 字符串分隔符 * @description 智慧型拼装器,a tool to convert string to string array values */ smartConcat: (toConcat: any, splitter: string) => string[]; } /** * @description a tool to convert obj into special forms */ export declare class JustObjManager { /** * @param toConvert 被转换对象, * @description 将对象转换成对象['key:内容']的字符串数组形式 */ justObjConvert: (toConvert: any) => any; } /** * @description Not just mathmatic fomulas, this is a super tool for sundry algrithm from scratch */ export declare class JustMathGenius { /** * edit distance calculation , greater more similar * @param str1 compariable 1 * @param str2 compariable 2 */ editDistance(str1: string, str2: string): number; /** * similarity of 2 numbers calculation, greater more similar * @param number1 * @param number2 */ numberDeviation(number1: number, number2: number): number; /** * coord distance sphere { lat: number, lng: number} * unit: meters * @param coords */ coordDistance(coords: any[]): number; /** * if the number is in the range * @param num to hit number * @param range *-* format range */ isHitRange(num: number, range: string): boolean | IAnswer; /** * timestamp converter * @param dt timstamp format date ( xxxx-xxxx ) version */ timestampConvert(timst: string): string | IAnswer | null; /** * linear Regression function * @param condition > < >= <= = * @param y dependent * @param x independent * @param linearFuntion */ linearReg(condition: justOperator, y: number, x: number, linearFuntion?: (thisx: number) => number): boolean; } export declare class JustSpy { constructor(); /** * base64 encoder * @param str * @param salt * @param numOfSalt number of Salt */ static base64Encoder(str: string, salt: string, numOfSalt: number): any; }