npm run dev
npm run build
- 浏览器环境
<!-- 会在 window 上挂载 toolsJs -->
<script src="./dist/bundle.js"></script>
<script>
console.log(toolsJs.typeCheck.isString([])) // false
console.log(toolsJs)
</script>
// 模块化方案
import toolsJs from '@killonepits/tools'
console.log(toolsJs.typeCheck.isString([])) // false
- Node 环境中
const toolsJs = require('@killonepits/tools')
console.log(toolsJs.typeCheck.isString([])) // false