@januswel/memoize
TypeScript icon, indicating that this package has built-in type declarations

0.4.2 • Public • Published

memoize v0.4.2

Exports functions to memoize functions with / without selectors.

Usage

See the *.test.ts files.

Exported functions

shallowly deeply
cache all args memoize deepMemoize
cache only previous args memoizeOnce deepMemoizeOnce

With selector

Selector is a function to select arbitrary properties from any objects. Selected properties by selector are used as arguments for memoized function.

const selector = obj => [obj.foo, obj.bar]

*WithSelector are available to memoize with selector.

Readme

Keywords

none

Package Sidebar

Install

npm i @januswel/memoize

Weekly Downloads

1

Version

0.4.2

License

MIT

Unpacked Size

332 kB

Total Files

60

Last publish

Collaborators

  • januswel