Skip to content

januswel/memoize

master
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
src
 
 
 
 
 
 
 
 
 
 
 
 
 
 

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.