【文件属性】:
文件名称:jsinterface:在 Node JS 中定义、实施和包装鸭子类型的接口到对象
文件大小:5KB
文件格式:ZIP
更新时间:2021-06-26 14:13:44
JavaScript
js接口
在 Node JS 中定义、实施和包装鸭子类型的接口到对象
var jsInterface = require ( 'jsinterface' ) ;
jsInterface . define ( { name : 'interface1' , methods : [ 'method1' ] , properties : [ 'prop1' ] } ) ;
var module1 = {
method1 : function ( ) { } ,
method2 : function ( ) { } ,
prop1 : 'test' ,
prop2 : false
} ;
var module2 = {
method1 : function ( ) { } ,
prop2 : false
} ;
// runs - no error
jsInterface
【文件预览】:
jsinterface-master
----index.js(44B)
----package.json(727B)
----test()
--------index.js(3KB)
----LICENSE(1KB)
----example.js(1KB)
----.gitignore(587B)
----lib()
--------index.js(2KB)
--------errors.js(356B)
----README.md(1KB)