x-type-check

类型检测

Usage no npm install needed!

<script type="module">
  import xTypeCheck from 'https://cdn.skypack.dev/x-type-check';
</script>

README

API

type

type('abc') // string

type('abc', 'string') // true

isBoolean, isNumber, isString, isFunction, isArray, isDate, isRegExp, isObject, isError

receive one arg and return boolean