npm.io
1.0.16 • Published 8 years ago

ic-utils

Licence
ISC
Version
1.0.16
Deps
0
Size
22 kB
Vulns
0
Weekly
0

ic-utils

A common assertion library for daily development.

Install

npm i ic-utils || yarn add ic-utils

Methods

isString(value)

returned true if the type of a value is string, or false

isPureObj(value)

returned true if the type of a value is object({}), or false

isFn(value)

returned true if the type of a value is function, or false

isBool(value)

returned true if the type of a value is boolean, or false

isArray(value)

returned true if the type of a value is Array, or false

Constants
isIOS

returned true if current platform is IOS, or false

isAndroid

returned true if current platform is Android, or false

isWechat

returned true if current platform is wechat(weixin), or false

isMobile

returned true if current device is mobile(include ipad), or false