0.0.1 • Published 4 years ago

@x12/common v0.0.1

Weekly downloads
-
License
Apache-2.0
Repository
github
Last release
4 years ago

@x12/common

github npm npm

安装

npm install @x12/common --save

使用

ES7:

const { md5 } = require('@x12/common');
// or
import { md5 } from '@x12/common';

console.log(md5('1'));

具体参数

Methods

getTimestamp() → {int}

获取UNIX标准时间戳

Returns:

UNIX标准时间戳

isEmpty(obj) → {boolean}

判断是否为空

Parameters:

任意

Returns:

真为空,假为非空

isNumberString(obj) → {boolean}

判断是否为数字字符串

Parameters:

任意

Returns:

是否为数字字符串

JSONparse(str, default) → {object}

安全处理 JSON

Parameters:

JSON字符串

默认值 {}

Returns:

JSON对象

License

Apache 2.0