32 lines
1.1 KiB
TypeScript
32 lines
1.1 KiB
TypeScript
/**
|
|
* 判断传入的值是否为true
|
|
* @param {Object} obj 传入值为'true','TRUE',1,'1','on','ON','YES','yes'时,返回true,其他值均返回false
|
|
* @return {boolean}
|
|
*/
|
|
declare function isTrue(obj: any): boolean;
|
|
/**
|
|
* 验证ObjectId格式是否正确
|
|
* @param {string} id
|
|
* @return {boolean}
|
|
*/
|
|
declare function isObjectId(id: string): boolean;
|
|
/**
|
|
* 10进制 -> 62进制
|
|
* @param {string | number} number
|
|
* @return {string}
|
|
*/
|
|
declare function string10to62(number: string | number): string;
|
|
/**
|
|
* 62进制 -> 10 进制
|
|
* @param {string} numberCode
|
|
* @return {number}
|
|
*/
|
|
declare function string62to10(numberCode: string): number;
|
|
declare const hexToBase58: (hexString: string) => string;
|
|
declare const base58ToHex: (base58String: string) => string;
|
|
declare const hexToBase32: (hexString: string) => string;
|
|
declare function compressUuid(e: string, t?: boolean): string;
|
|
declare function compressHex(e: string, r: number): string;
|
|
|
|
export { base58ToHex, compressHex, compressUuid, hexToBase32, hexToBase58, isObjectId, isTrue, string10to62, string62to10 };
|