
Research
Supply Chain Attack on Axios Pulls Malicious Dependency from npm
A supply chain attack on Axios introduced a malicious dependency, plain-crypto-js@4.2.1, published minutes earlier and absent from the project’s GitHub releases.
Tenure is a manageable LRU cache instance that uses hashmap lookups and an Open Doubly Linked List to enact the
Least-Recently Used algorithm
npm install tenure
OR
yarn add tenure

Tenure currently supports UMD, CommonJS (node versions >= 10), and ESM build-targets
Commonjs:
var LruCache = require('tenure');
var cache = new LruCache(100, cb);
ESM:
import LruCache from 'tenure';
const cache = new LruCache(100, cb);
any | nullbooleanbooleanarray | nullnumbernumbernumberImplements a canonical Least Recently-Used Cache
| Param | Type | Description |
|---|---|---|
| capacity | number | The maximum capacity (items) of the cache; beyond this threshold, the eviction policy is enacted. Defaults to 10 |
| cb | function | Optional callback to be invoked upon each eviction; called with evicted item key, value |
any | nullRetrieve an item from the cache; if extant, the item will be designated 'most-recently used'
Returns: any | null - The retrieved value, if extant; else, null
| Param | Type |
|---|---|
| key | any |
booleanAdd or update a given key / value pair in the cache
Put transactions will move the key to the head of the cache, designating it as 'most recently-used'
If the cache has reached the specified capacity, Put transactions will also enact the eviction policy,
thereby removing the least recently-used item
Returns: boolean - A boolean indicating whether an eviction occurred
| Param | Type |
|---|---|
| key | any |
| value | any |
booleanRemove an item corresponding to a given key from the cache, if extant
Returns: boolean - A boolean indicating whether of not the delete transaction occurred
| Param | Type |
|---|---|
| key | any |
Returns: An array of all keys currently extant in the cache
Verify the existence of a key in the cache without enacting the eviction policy Returns: A boolean flag verifying the existence (or lack thereof) of a given key in the cache
| Param | Type |
|---|---|
| key | any |
array | nullReturns: array | null - the least recently-used key / value pair, or null if not extant
Drop all items from the cache, effectively purging it
numberResizes the cache capacity.
Invoking this transaction will evict all least recently-used items to adjust the cache, where necessary
Returns: number - the number of evictions enacted
| Param | Type | Description |
|---|---|---|
| cap | number | new capacity |
numberReturns: number - the current size of the cache
numberReturns: number - the current maximum buffer capacity of the cache
FAQs
An manageable LRU cache and configurable eviction policy
The npm package tenure receives a total of 0 weekly downloads. As such, tenure popularity was classified as not popular.
We found that tenure 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
A supply chain attack on Axios introduced a malicious dependency, plain-crypto-js@4.2.1, published minutes earlier and absent from the project’s GitHub releases.

Research
Malicious versions of the Telnyx Python SDK on PyPI delivered credential-stealing malware via a multi-stage supply chain attack.

Security News
TeamPCP is partnering with ransomware group Vect to turn open source supply chain attacks on tools like Trivy and LiteLLM into large-scale ransomware operations.