0.3.0 • Published 4 months ago
@jil/decorators v0.3.0
@jil/decorators
Experimental decorators for common patterns.
Forked from @boost/decorators
import {bind} from '@jil/decorators/bind';
import {memoize} from '@jil/decorators/memoize';
class Example {
@bind()
referencedMethod() {
return this; // Class instance
}
@memoize()
someExpensiveOperation() {
// Do something heavy
}
}
Features
@bind
- Auto-bind a method'sthis
to the class context.@debounce
- Defer the execution of a method in milliseconds.@deprecate
- Mark a property, method, or class as deprecated.@memoize
- Cache and return the result of a method execution.@throttle
- throttle the execution of a method to a timeframe in milliseconds.
Installation
npm i @jil/decorators
Documentation
0.3.0
4 months ago
0.2.21
7 months ago
0.2.20
11 months ago
0.2.19
1 year ago
0.2.18
1 year ago
0.2.16
1 year ago
0.2.15
1 year ago
0.2.17
1 year ago
0.2.14
2 years ago
0.2.13
2 years ago
0.2.12
2 years ago
0.2.11
2 years ago
0.2.10
2 years ago
0.2.7
2 years ago
0.2.6
2 years ago
0.2.9
2 years ago
0.2.8
2 years ago
0.2.5
2 years ago
0.2.4
2 years ago
0.2.3
2 years ago
0.2.2
2 years ago
0.2.1
2 years ago
0.2.0
2 years ago