2.0.0 • Published 3 years ago

naves v2.0.0

Weekly downloads
3
License
MIT
Repository
github
Last release
3 years ago

naves

Build Status

Powerful JavaScript Utility Library.

Installation

npm install --save naves

Documentation

memoize

memoize<[T1, T2, ...], R>(fn);

Creates new function which memoizes the result of fn. As a cache key memoization function uses JSON.stringified result of arguments provided to memoized function. If one of arguments include circular reference than memoized function can not cache the result and calculates it in every call.

import { memoize } from 'naves';

...

const memoizedFn: (...args: T) => R = memoize<[T1, T2, ...], R>(fn);

memoizedFn(...args);

License

This project is licensed under the MIT License - see the LICENSE file for details.

2.0.0

3 years ago

1.0.0

4 years ago