thing-factory:从文件创建伪类

时间:2021-07-04 14:47:52
【文件属性】:
文件名称:thing-factory:从文件创建伪类
文件大小:6KB
文件格式:ZIP
更新时间:2021-07-04 14:47:52
JavaScript 东西工厂 创建从类定义文件继承的伪类的实例。 填充一个包含您的类定义的目录(例如,参见things/ )并使用新的ThingFactory实例化它们。 ThingFactory 将通过您在类定义中指定的继承链自动递归,并从取代它的类继承适当的属性。 例子 var thingFactory = new ThingFactory ( './classDir' ) ; var SuperState = thingFactory . create ( 'SuperClass' , { } ) ; var inheritanceChain = thingFactory . inheritance ( SuperState ) ; console . log ( inheritanceChain ) ; // -> [ 'BaseClass', 'ExtendedClass', 'SuperC
【文件预览】:
thing-factory-master
----.travis.yml(41B)
----test()
--------test.js(1KB)
----LICENSE.md(1KB)
----README.md(2KB)
----util.js(2KB)
----.gitignore(32B)
----index.js(3KB)
----package.json(792B)
----things()
--------baseclass.js(97B)
--------extendedclass.js(249B)
--------superclass.js(257B)

网友评论