inmemorymemoize

1.1.2 • Public • Published

InMemoryMemoize

nodejs InMemoryMemoize is a key => value memoization package with no other dependancies which makes use of latest javascript technologies

Installation

Install InMemoryMemoize with npm

  npm i inmemorymemoize

Features

  • Light weight
  • no dependancies
  • Typescript support
  • in memory memoization
  • multiple memory stores
  • supports Stream

Documentation

Documentation

// ES6
import { InMemoryMemoize } from "inmemorymemoize";

// CommonJS
const { InMemoryMemoize } = require("inmemorymemoize");

How to

  1. first you have to create a new instance of your memoization memory
javascript
const user = new InMemoryMemoize(name, options);
TypeScript
const user = new InMemoryMemoize<string | number>(name, options);

InMemoryMemoize constructor accepts two parameters

name is a string which denotes the memory name and options is an optional parameter which is an object to configure the memory if needed.

  1. Add entries to the memory
user.add("name", "john");

Note: instance.add(key, value) method can also be chained.

user.add("name", "john").add("age", 25).add("gender", "male");

instance.add(key, value) method always accepts two parameters. a key and a value. key should always be a string. and value can be of any javascript type

Badges

MIT License

Authors

Support

For support, email amalu.sajeev.me@gmail.com

Tech Stack

Client: not-supported currently

Server: Node

🚀 About Me

I'm a full stack developer...

Hi, I'm Amalu! 👋

🛠 Skills

Javascript, HTML, CSS, JQuery, SASS, TypeScript, NodeJS, EXPRESS, MongoDB, GraphQL, TypeGraphQL, DynamoDB

Dependencies (0)

    Dev Dependencies (13)

    Package Sidebar

    Install

    npm i inmemorymemoize

    Weekly Downloads

    0

    Version

    1.1.2

    License

    ISC

    Unpacked Size

    27.3 kB

    Total Files

    17

    Last publish

    Collaborators

    • amalu_sajeev