New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details
Socket
Book a DemoSign in
Socket

chillman

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

chillman

simple dampening library for node.js that makes sure that multiple successive calls to resolve a resource waits after the first, so that the resource is only resolved once per resource resolving storm

latest
Source
npmnpm
Version
1.0.3
Version published
Maintainers
1
Created
Source

chillman

simple dampening library for node.js that makes sure that multiple successive calls to resolve a resource waits after the first, so that the resource is only resolved once per resource resolving storm.

The use case is where you have an expensive function, that takes some time and resolves a resource for you, and when you get it back you put it in a cache, of course. So that the next orderly request doens't have to go all the way over the network again.

The problem is that when you retsrat your service, you'll get a gazillion calls to the function - all of which happens too quickly for your cache to be filled.

What Chillman does is to remember what you asked for in the first fucntion call for that whatever it is, and to paus all subsequent calls for that same resource. When the very first call gets resolved, the other following calls will be continued, so a gazillion calls will only result in one resource utilization.

See tests for example. Promises are used heavillt and Chillman depends on that the resource-fullfillment function anse return a promise.

Keywords

node.js

FAQs

Package last updated on 18 Jun 2022

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