1.0.3 • Published 4 years ago

@feizheng/next-memoize v1.0.3

Weekly downloads
3
License
MIT
Repository
-
Last release
4 years ago

next-memoize

Memoize for next.

version license size download

installation

npm install -S @feizheng/next-memoize

usage

import '@feizheng/next-memoize';

const fibonacci = (n) => {
  return n < 2 ? n : fibonacci(n - 1) + fibonacci(n - 2);
};
const memoized = nx.memoize(
  fibonacci
);

// First time: calc
const rs1 = memoized(number);
// Next time: From Cache
const rs2 = memoized(number);

license

Code released under the MIT license.

1.0.3

4 years ago

1.0.2

4 years ago

1.0.1

4 years ago

1.0.0

4 years ago