sd-box

A toolbox for NodeJS

Usage no npm install needed!

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

README

sd-box

A toolbox for NodeJS

安装:

npm install sd-box

# 或者

yarn add sd-box

使用

// NodeJS
const tools = require('sd-box').default.type

// Browser
import tools from 'sd-box'

tools.type.isString('') // true
tools.type.isNumber(0) // true
tools.type.isNumberic('1') // true
tools.type.isNaN(+'a') // true
tools.type.isBoolean(false) // true
tools.type.isNull(null) // true
tools.type.isUndefined(undefined) // true
tools.type.isFunction(()=>{}) // true
tools.type.isObject({}) // true
tools.type.isArray([]) // true