Socket
Socket
Sign inDemoInstall

expire-unused-keys

Package Overview
Dependencies
0
Maintainers
1
Versions
14
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 1.0.3 to 1.0.4

15

index.js

@@ -23,2 +23,8 @@ var EventEmitter = require('events').EventEmitter

function filterForgotten(keys) {
return keys.filter(function(key) {
return forgotten.indexOf(key) === -1
})
}
var checkForExpiredKeys = onlyLetOneTaskRunAtATime(function check(done) {

@@ -33,5 +39,3 @@ var now = new Date().getTime()

// Need to make sure that none of these keys were "forgotten" since we opened the read stream
var expiringNow = batchKeys.filter(function(key) {
return forgotten.indexOf(key) === -1
})
var expiringNow = filterForgotten(batchKeys)
var batchObjects = expiringNow.map(function(key) {

@@ -43,8 +47,7 @@ return {type: 'del', key: key}

if (!err) {
expiringNow.forEach(expirer.emit.bind(expirer, 'expire'))
filterForgotten(expiringNow).forEach(expirer.emit.bind(expirer, 'expire'))
}
forgotten = []
done(err)
})
forgotten = []
})

@@ -51,0 +54,0 @@ })

2

package.json
{
"name": "expire-unused-keys",
"version": "1.0.3",
"version": "1.0.4",
"main": "./index.js",

@@ -5,0 +5,0 @@ "author": {

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