Skip to content

narekkeryan/naves

Repository files navigation

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.

About

Powerful JavaScript/TypeScript Utility Library.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published