0.0.4 • Published 6 years ago

memoized-decorator v0.0.4

Weekly downloads
2
License
MIT
Repository
github
Last release
6 years ago

Memoized Decorator

A minimilistic memoize decorator. Written because the only other memoize decorator I found in NPM didn't support arguments!

Serializes arguments via serialize-javascript package. Only caveat I know of is that undefined serializes to null, but this behavior seems correct to me. If you disagree open an issue and we can discuss :)

Installation

npm install --save-dev memoized-decorator

Usage

import memoize from 'memoized-decorator';

class Foo {
  @memoize
  myMethod() {
    // ...
  }
}