memoized-decorator

0.0.4 • Public • Published

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() {
    // ...
  }
}

Package Sidebar

Install

npm i memoized-decorator

Weekly Downloads

1

Version

0.0.4

License

MIT

Unpacked Size

7.24 kB

Total Files

8

Last publish

Collaborators

  • zyklus