0.3.0 • Published 2 years 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
2 years ago
0.2.21
2 years ago
0.2.20
2 years ago
0.2.19
2 years ago
0.2.18
2 years ago
0.2.16
3 years ago
0.2.15
3 years ago
0.2.17
3 years ago
0.2.14
3 years ago
0.2.13
3 years ago
0.2.12
3 years ago
0.2.11
3 years ago
0.2.10
3 years ago
0.2.7
3 years ago
0.2.6
3 years ago
0.2.9
3 years ago
0.2.8
3 years ago
0.2.5
3 years ago
0.2.4
3 years ago
0.2.3
3 years ago
0.2.2
3 years ago
0.2.1
3 years ago
0.2.0
3 years ago