Skip to content

Robbie-Cook/magic-memo

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Magic Memo

About

This is a package that helps with memoising data in Node and browser JS.


Usage

Import

import Memo from "magic-memo";

or

const Memo = require("magic-memo").default;

Calling

You can use the default hashing:

Memo.memo(() => {
  console.log("I am a function");
});

or define your own hashing function

Memo.memo(
  (myParam) => {
    console.log("I am a function");
  },
  (myParam) => myParam
);

About

A modern memoisation library that supports async/await and Promises

Resources

Stars

Watchers

Forks

Packages

No packages published