2.0.4 • Published 6 years ago
litchy v2.0.4
litchy | EcmaScript infrastructure
综述
ES201x基础对象模型, 以mixin和装饰的形式提供.
安装
npm install litchy --save
使用
mixin形式
import Eventable from 'litchy/lib/mixin/Disposable'
import mix from 'litchy/lib/mix'
class Base {
// ...
}
class Foobar extends mix(Base).with(Disposable) {
someMethod() {
this.assertUndisposed()
// ...
}
}
装饰形式
import disposable from 'litchy/lib/decorator/disposable'
import undisposed from 'litchy/lib/decorator/undisposed'
import mix from 'mix-with'
@disposable
class Foobar {
@undisposed
someMethod() {
// ...
}
}
文档
2.0.4
6 years ago
2.0.2
6 years ago
2.0.1
6 years ago
2.0.0
6 years ago
1.4.6
6 years ago
1.4.5
6 years ago
1.4.4
6 years ago
1.4.3
6 years ago
1.4.2
6 years ago
1.4.1
6 years ago
1.4.0
6 years ago
1.3.0
6 years ago
1.2.3
6 years ago
1.2.2
6 years ago
1.2.1
6 years ago
1.2.0
6 years ago
1.1.1
6 years ago
1.0.2
6 years ago
1.0.1
6 years ago
0.1.0
6 years ago