sd-browser-type

水滴前端类型判断

Usage no npm install needed!

<script type="module">
  import sdBrowserType from 'https://cdn.skypack.dev/sd-browser-type';
</script>

README

type

类型判断

Usage

const type = require('sd-browser-type');

// 是否为String
type.isString()

支持的API

|名称|描述| |--|--| |isString|是否字符串| |isNaN|是否为NaN| |isNumber|是否为数字| |isNumberic|是否可以转成数字| |isBoolean|是否为布尔值| |isNull|是否为null| |isUndefined|是否为undefined| |isFunction|是否为函数| |isObject|是否是对象| |isArray|是否是数组| |isEmptyObject|是否为空对象{}|