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's- thisto 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/decoratorsDocumentation
0.3.0
2 years ago
0.2.21
2 years ago
0.2.20
2 years ago
0.2.19
3 years ago
0.2.18
3 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
4 years ago
0.2.11
4 years ago
0.2.10
4 years ago
0.2.7
4 years ago
0.2.6
4 years ago
0.2.9
4 years ago
0.2.8
4 years ago
0.2.5
4 years ago
0.2.4
4 years ago
0.2.3
4 years ago
0.2.2
4 years ago
0.2.1
4 years ago
0.2.0
4 years ago