typed-[removed]JavaScript 中的一个简短的动态类型检查示例

时间:2021-07-02 21:38:14
【文件属性】:
文件名称:typed-[removed]JavaScript 中的一个简短的动态类型检查示例
文件大小:13KB
文件格式:ZIP
更新时间:2021-07-02 21:38:14
JavaScript 类型化的javascript JavaScript 的简单动态类型检查。 在 Node.js 和浏览器中运行,可用于生产。 包含在 Node.js 中: var T = require ( "./typed" ) ; 包含在浏览器中 < script src =" typed.js " > </ script > 有关其他示例,请参阅 example.js,有关源代码请参阅 typed.js。 // Define two simple types T . define ( "Person" , { name : null , age : null } ) ; T . define ( "Country" , { name : T . string } ) ; // Test type using in a normal JavaScript fun
【文件预览】:
typed-javascript-master
----.gitignore(34B)
----package.json(830B)
----gulpfile.js(490B)
----browserexample.html(135B)
----LICENSE(1KB)
----README.md(948B)
----example.js(2KB)
----typed.js(6KB)
----test()
--------number.object.test.js(1KB)
--------string.primitive.test.js(1KB)
--------array.test.js(1KB)
--------recursive.test.js(2KB)
--------function.test.js(1KB)
--------number.primitive.test.js(1KB)
--------boolean.primitive.test.js(1KB)
--------boolean.object.test.js(1KB)
--------any.test.js(758B)
--------main.test.js(3KB)
--------string.object.test.js(1KB)

网友评论