radar-test-util
v1.0.0
Published
util for radar test
Downloads
2
Readme
util functions for radar test
isString(o)
isArray(o)
isFunction(o)
isObject(o)
objectSize(o)
objectSize({x: 100}) => 1
isEmptyObject(o):boolean
isEmptyObject({}) => true
objectValues(o)
objectValues({x: 100, y: 200}) => [100, 200]
isInObjectValues(o, o):boolean
isInObjectValues(100, {x: 100, y: 200}) => true
md5Str(o)
md5Str(1) => 'c4ca4238a0b923820dcc509a6f75849b'
md5File(p)
md5File('/a/a') => ''
isFile(p):boolean
isFile('/a/a') => false
readJSONFile(p)
readJSONFile('/a/a') => {x: 100}
extend(...o)
extend({}, {x: 100}, {y: 100}) => {x: 100, y: 100}
getFormatTime(date, format)
getFormatTime() => '2016-06-06 12:12:12'
getExternalIp()
isReadStream(rs):boolean
trim(o)
getMAC
get local mac address