【文件属性】:
文件名称:Estira:将 Livescript 的类系统暴露给 JavaScript
文件大小:6KB
文件格式:ZIP
更新时间:2021-07-08 12:17:52
JavaScript
有一个非常漂亮的班级系统。 可惜我们不能在 JS-land 中使用它。
或者我们可以。
埃斯蒂拉
const Base = require ( 'estira' ) ;
var Foo = Base . extend ( {
initialize : function ( bar ) {
this . bar = bar ;
} ,
frob : function ( baz ) {
return this . bar + baz ;
}
} ) ;
var foo = new Foo ( "hello " ) ;
foo . frob ( "world" ) ; //⇒ "hello world"
应用程序接口
Base = require('estira')
具有继承所需的最低限度的基类。 扩展它,它本身并没有做太多事情。
Subclass =
【文件预览】:
Estira-develop
----bower.json(246B)
----test.js(4KB)
----.npmignore(41B)
----index.ls(680B)
----.travis.yml(37B)
----Makefile(326B)
----licence.md(1KB)
----.gitignore(30B)
----index.js(3KB)
----readme.md(2KB)
----package.json(778B)