Security News
UK Officials Consider Banning Ransomware Payments from Public Entities
The UK is proposing a bold ban on ransomware payments by public entities to disrupt cybercrime, protect critical services, and lead global cybersecurity efforts.
debounce-hashed
Advanced tools
This is basically underscore's debounce with an additional hashing function.
Example:
function ping(user) {
user.ping()
}
// You want to debounce these pings at a 100ms interval,
// but on a per user basis
var debounceHashed = require('debounce-hashed')
var pingDebounced = debounceHashed(ping, function hashingFn(user) {
return user.id
}, 100)
// Or if you ping only by userid
var pingDebounced2 = debounceHashed(function pingById(userid) {
user.getById(userid, function (err, user) {
if (!err && user) user.ping();
})
}, function hashingFn(userid) {
return userid
}, 100)
fn
- the function to be debouncedhashingFn
- hashing function.
Receives the same arguments as fn
.
Should return a string.wait
immediate
FAQs
Debounce a function based on a hashing function
The npm package debounce-hashed receives a total of 167 weekly downloads. As such, debounce-hashed popularity was classified as not popular.
We found that debounce-hashed demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 2 open source maintainers collaborating on the project.
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.
Security News
The UK is proposing a bold ban on ransomware payments by public entities to disrupt cybercrime, protect critical services, and lead global cybersecurity efforts.
Security News
Snyk's use of malicious npm packages for research raises ethical concerns, highlighting risks in public deployment, data exfiltration, and unauthorized testing.
Research
Security News
Socket researchers found several malicious npm packages typosquatting Chalk and Chokidar, targeting Node.js developers with kill switches and data theft.