1.0.1 • Published 8 years ago

decorator-memoize v1.0.1

Weekly downloads
4
License
MIT
Repository
github
Last release
8 years ago

memoizer

Version Commitizen friendly Build Status

A simple javascript function to use with @decorate for caching functions in ES6 classes.

npm install decorator-memoize --save

Usage

import { decorate } from 'core-decorators'
import memoize from 'decorator-memoize'

class School {
  @decorate(memoize)
  getSchools(zipcode, radius) {
    ...
  }
}

The getSchools function will be executed only once for the same (zipcode, radius) input

License

MIT

1.0.1

8 years ago

1.0.0

8 years ago