Socket
Socket
Sign inDemoInstall

memoized-decorator

Package Overview
Dependencies
1
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    memoized-decorator

Minimalistic memoization decorator


Version published
Maintainers
1
Install size
20.3 kB
Created

Readme

Source

Memoized Decorator

A minimilistic memoize decorator. Written because the only other memoize decorator I found in NPM didn't support arguments!

Serializes arguments via serialize-javascript package. Only caveat I know of is that undefined serializes to null, but this behavior seems correct to me. If you disagree open an issue and we can discuss :)

Installation

npm install --save-dev memoized-decorator

Usage

import memoize from 'memoized-decorator';

class Foo {
  @memoize
  myMethod() {
    // ...
  }
}

Keywords

FAQs

Last updated on 25 Feb 2018

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc