This is a package that helps with memoising data in Node and browser JS.
import Memo from "magic-memo";or
const Memo = require("magic-memo").default;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
);