-
Notifications
You must be signed in to change notification settings - Fork 0
Home
checkA 节点元素 fy.isElement (value) 测试value是否为 html 元素。
一个通用的 JavaScript 类型测试库
$ npm install fy.js
# or
$ yarn add fy.js-
fy.isA(value, type) orfy.isType(value, type)测试
value的 typeOf 是否为type类型。 -
fy.isDefined(value)测试是否定义了
value。 -
fy.isEmpty(value)测试
value是否为空。 -
fy.isEqual(value, other)测试
value是否等于other。 -
fy.isHosted(value, host)测试
value是否由Host托管。 -
fy.isInstance(value, constructor)测试
value是否为constructor的实例。 -
fy.isNull(value)测试
value是否null。 -
fy.isUndefined(value)测试
value是否undefined。
-
fy.isArgs(value)测试
value是否为参数对象。 -
fy.isArgs.isEmpty(value)测试
value是否为空参数对象。
-
fy.isArray(value)测试
value是否为array。 -
fy.isArray.isEmpty(value)测试
value是否为空array。 -
fy.isArrayLike(value)测试
value是否是类array的对象。
-
fy.isBool(value)测试
value是否为布尔值。 -
fy.isTrue(value)测试
value是否为true。 -
fy.isFalse(value)测试
value是否为false。
-
fy.isDate(value)测试
value是否为日期。
-
fy.isElement(value)测试
value是否为 html 元素。
-
fy.isError(value)测试
value是否为error对象。
-
fy.isFn(value)测试
value是否为函数对象。
-
fy.isNumber(value)测试
value是否为数字。 -
fy.isInfinite(value)测试
value是正无穷大还是负无穷大。 -
fy.isDecimal(value)测试
value是否为十进制数。 -
fy.isDivisibleBy(value, n)测试
value是否可以被N整除。 -
fy.isInteger(value)测试
value是否为整数。 -
fy.isMaximum/isMax(value, others[])测试
value是否是others值中最大的。 -
fy.isMinimum/isMin(value, others[])测试
value是否是others值中最小的。 -
fy.isNaN(value)测试
value是否不是 NaN。 -
fy.isEven(value)测试
value是否为偶数。 -
fy.isOdd(value)测试
value是否为奇数。 -
fy.isGe(value, other)测试
value是否大于或等于other。 -
fy.isGt(value, other)测试
value是否大于other。 -
fy.isLe(value, other)测试
value是否小于等于other。 -
fy.isLt(value, other)测试
value是否小于other。 -
fy.isWithin(value, start, finish)测试
value是否在start和finish之间。
-
fy.isObject(value)测试
value是否为 Object。
-
fy.isRegexp(value)测试
value是否为正则表达式。
-
fy.isString(value)测试
value是否为字符串。
-
fy.isBase64(value)测试
value是否为有效的 Base64 编码字符串。 -
fy.isHex(value)测试
value是否为有效的十六进制编码字符串。
-
fy.isSymbol(value)测试
value是否为 ES6 Symbol。
-
fy.isBigint(value)测试
value是否为 ES 建议的 BigInt