UNPKG

jcommon

Version:

JavaScript 常用纯函数工具库

47 lines (46 loc) 1.34 kB
/** * @description: 转换Rh血型 * @author: wuxh * @Date: 2021-09-07 13:44:36 * @param {*} * @return {*} * @example: formatRhBloodGroup('**D**') => 阳性 * formatRhBloodGroup('+') => 阳性 * */ export declare const formatRhBloodGroup: (input: string, optiongs?: { format?: [string | number | boolean, string | number | boolean]; default?: string | number | boolean; negative?: Array<string>; positive?: Array<string>; }) => string | number | boolean; /** * @description: 是否阴性 * @author: wuxh * @Date: 2022-01-17 23:57:31 * @param {string} input * @return {*} * @example: */ export declare const isRhNegative: (input: string) => string | number | boolean; /** * @description: 是否阳性 * @author: wuxh * @Date: 2022-01-17 23:57:19 * @param {string} input * @return {*} * @example: */ export declare const isRhPositive: (input: string) => string | number | boolean; /** * @description: sort [] * @author: wuxh * @Date: 2021-09-07 14:12:06 * @param {string} key * @return {*} * @example: * const arr = [{name: '666'}, {name: '333'}] * arr.sorterCallBackString('name') => [{name: '333'}, {name: '666'}] * arr.sorterCallBackString('name', false) => [{name: '666'}, {name: '333'}] */ export declare const sorterCallBack: (key: string, isAscend?: boolean) => (a: any, b: any) => 1 | -1;