magic-memo
TypeScript icon, indicating that this package has built-in type declarations

1.0.3 • Public • Published

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
);

Package Sidebar

Install

npm i magic-memo

Weekly Downloads

3

Version

1.0.3

License

ISC

Unpacked Size

18 kB

Total Files

9

Last publish

Collaborators

  • robbie-cook