typsy:简单,可链接JavaScript类型检查

时间:2021-05-13 17:15:28
【文件属性】:
文件名称:typsy:简单,可链接JavaScript类型检查
文件大小:77KB
文件格式:ZIP
更新时间:2021-05-13 17:15:28
JavaScript 伤寒 简单,可链接JavaScript运行时类型检查 安装 npm install -- save typsy 进口 // myfile.js // ES module import { typeCheck } from "typsy" ; // Node.js const typeCheck = require ( "typsy" ) . typeCheck ; 用 const x = "This is a string" ; typeCheck ( x ) . isString ( ) . yields ( ) ; // true typeCheck ( x ) . isInteger ( ) . yields ( ) ; // false typeCheck ( x ) . isString ( ) . or ( ) . isInteger ( ) . yields ( ) ; //
【文件预览】:
typsy-master
----.gitignore(52B)
----.babelrc(39B)
----package.json(891B)
----package-lock.json(374KB)
----src()
--------debugging-checks.js(480B)
--------index.test.js(16KB)
--------index.js(4KB)
----LICENSE(1KB)
----rollup.config.js(1KB)
----.prettierignore(63B)
----README.md(2KB)

网友评论