Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

async-memoizer

Package Overview
Dependencies
Maintainers
0
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

async-memoizer

A memoizer for asynchronous methods obeying node.js conventions (last argument is always a callback).

  • 0.3.1
  • Source
  • npm
  • Socket score

Weekly downloads
0
Maintainers
0
Weekly downloads
 
Created
Source

async-memoizer

A memoizer for asynchronous methods which obeys node.js conventions (last argument is always a callback).

async-memoizer makes the memoization process external and transparent and keeps the method's asynchronous behaviour by relying on process.nextTick for memoized results.

Usage

var obj = {
  readFile(callback) {
    require('fs').readFile('path/to/file.txt', 'utf8', callback);
  }
};

require('async-memoizer').memoize(obj, 'readFile');

License

Licensed under the MIT license, Copyright 2010 Tobie Langel.

FAQs


Did you know?

Socket

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
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc