nsn-util
Version:
NSN工具辅助组件
21 lines (20 loc) • 986 B
TypeScript
import { isDate, isEqual, split } from 'lodash';
/** 值为空,取默认值 */
declare const blankToDefault: (value: any, defaultValue: any) => any;
/** 值为空,取空字符串 */
declare const blankToEmpty: (value: any) => any;
/** 判定是否node环境 */
declare const isNode: () => boolean | undefined;
/** 判定是否浏览器环境 */
declare const isBrowser: () => boolean | undefined;
/** 判定是否url */
declare const isUrl: (path: string) => boolean;
/** 随机值 */
declare const guid: () => string;
/** 是否空值 */
declare const isEmpty: (str: string | null | undefined) => boolean | undefined;
/** 去掉首尾空格 */
declare const trim: (str: string | null | undefined) => string | null | undefined;
/** 去掉前后空格后,是否为空 */
declare const isTrimEmpty: (str: string | null | undefined) => boolean | undefined;
export { blankToDefault, blankToEmpty, isEqual, split, isNode, isBrowser, isUrl, guid, isEmpty, isTrimEmpty, isDate, trim, };