
Research
Node.js Fixes AsyncLocalStorage Crash Bug That Could Take Down Production Servers
Node.js patched a crash bug where AsyncLocalStorage could cause stack overflows to bypass error handlers and terminate production servers.
expire-array
Advanced tools
An array-like structure that removes each element after a given timeout. Or think of it as a rolling window on top of an array which only contains the most recent elements.
npm install expire-array
// Initialize with a timeout of 10 seconds
var arr = require('expire-array')(1000 * 10)
// Add elements to the array using .push()
arr.push(1)
// Retrive all elements from the array using .all()
arr.all() // => [1]
setTimeout(function () {
// after 5 seconds
arr.push(2)
console.log(arr.all()) // outputs: [1, 2]
}, 1000 * 5)
setTimeout(function () {
// after 11 seconds
console.log(arr.all()) // outputs: [2]
}, 1000 * 11)
setTimeout(function () {
// after 16 seconds
console.log(arr.all()) // outputs: []
}, 1000 * 16)
Initialize expire-array with a timeout in milliseconds:
var ExpireArray = require('expire-array')
var arr = ExpireArray(1000 * 60) // one minute
arr.push(elm)Add an element to the end of the array.
arr.pop()Removes the last element from an array and returns that element.
arr.shift()Removes the first element from an array and returns that element.
arr.all()Returns all the elements in the array that have not expired. The returned array is a clone and none of its elements will ever expire.
arr.forEach(callback[, thisArg]) (wrapper method)Just like the equivalent
Array.prototype.forEach()
method, this forEach() method executes a provided function once per
array element.
callback - Function that produces an element of the new Array,
taking two argumentsthisArg - Optional. Value to use as this when executing callbackCallback arguments:
currentValue - The current element being processed in the arrayindex - The index of the current element being processed in the
arrayarr.map(callback[, thisArg]) (wrapper method)Just like the equivalent
Array.prototype.map()
method, this map() method creates a new array with the results of
calling a provided function on every element in this array.
callback - Function that produces an element of the new Array,
taking two argumentsthisArg - Optional. Value to use as this when executing callbackCallback arguments:
currentValue - The current element being processed in the arrayindex - The index of the current element being processed in the
arrayarr.every(callback[, thisArg]) (wrapper method)Just like the equivalent
Array.prototype.every()
method, this every() method tests whether all elements in the array
pass the test implemented by the provided function.
callback - Function to test for each element, taking two argumentsthisArg - Optional. Value to use as this when executing callbackCallback arguments:
currentValue - The current element being processed in the arrayindex - The index of the current element being processed in the
arrayarr.some(callback[, thisArg]) (wrapper method)Just like the equivalent
Array.prototype.some()
method, this some() method tests whether some element in the array
passes the test implemented by the provided function.
callback - Function to test for each element, taking two argumentsthisArg - Optional. Value to use as this when executing callbackCallback arguments:
currentValue - The current element being processed in the arrayindex - The index of the current element being processed in the
arrayMIT
FAQs
An array-like structure that removes each element after a given timeout
The npm package expire-array receives a total of 53 weekly downloads. As such, expire-array popularity was classified as not popular.
We found that expire-array demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer 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.

Research
Node.js patched a crash bug where AsyncLocalStorage could cause stack overflows to bypass error handlers and terminate production servers.

Research
/Security News
A malicious Chrome extension steals newly created MEXC API keys, exfiltrates them to Telegram, and enables full account takeover with trading and withdrawal rights.

Security News
CVE disclosures hit a record 48,185 in 2025, driven largely by vulnerabilities in third-party WordPress plugins.