
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.
wool-store
Advanced tools
A module to provide a basic in-memory key-value Store with Pub/Sub mechanism for project build with Wool.
The interface is mainly async to enable future implementation working with persistent Database backends (MongoDB, Redis, Postgres, MariaDB, ...).
import { Store } from 'wool-store'
const store = Store.build()
await store.set('key', { foo: 'bar' })
const value = await store.get('key')
An in-memory key-value Store with Pub/Sub mechanism
Checks presence of one entry in the key-value store
k string The key of the entryReturns Promise<boolean> Resolves with the presence when the operation is complete
Gets one entry in the key-value store
k string The key of the entryReturns Promise<any> Resolves with the value when the operation is complete
Sets one entry in the key-value store.
Also publish with PubSubType.set type to subscribers.
k string The key of the entryv any The value of the entryReturns Promise<void> Resolves when the operation is complete
Deletes one entry in the key-value store.
Also unsubscribe any subscriber and publish the entry with PubSubType.del type.
k string The key of the entryReturns Promise<void> Resolves when the operation is complete
Find entries in the key-value store matching a query.
Returns an async iterable of [key, value] pairs, where each value is mapped by the provided function and filtered by the query predicate or regular expression.
q (function ([string, any]): boolean | RegExp)? A predicate function that receives a [key, value] pair and returns true to include it, or a RegExp to match keys. If omitted, all entries are included. (optional, default undefined)f function (any): any? A mapping function applied to each value before filtering. Defaults to the identity function. (optional, default x=>x)// Find all keys matching /^foo/ and uppercase the values
for await (const [k, v] of store.find(/^foo/, v => v.toUpperCase())) {
console.log(k, v);
}
Returns AsyncIterable<[string, any]> Async iterable of filtered [key, mappedValue] pairs.
Finds the first entry in key-value store matching a query and returns its value
q (function ([string, any]): boolean | RegExp)? A predicate function that receives a [key, value] pair and returns true to include it, or a RegExp to match keys. If omitted, all entries are included. (optional, default undefined)Returns Promise<(any | undefined)> The value if found, undefined otherwise
Checks if a subscription exists on a key for a source
Returns Promise<boolean> Resolves with the presence of a subscription when the operation is complete
Triggers a Publish on the entry for a given key with PubSubType.pub type.
k string The key of the entryReturns Promise<void> Resolves when the operation is complete
Subscribes to an entry on a key for a source with a callback on changes.
src string The source of the subscriptionk string The key of the subscribed valuecb function (k: string, v: any, t: PubSubType): void The callback triggered when a publish is triggered on a subscribed entry* k The key of the subscribed value
v The subscribed valuet The type of triggernow boolean Triggers a publish with PubSubType.sub typeReturns Promise<void> Resolves when the operation is complete
Unsubscribes to an entry on a key for a source
Returns Promise<void> Resolves when the operation is complete
Checks if a global subscription exists for a source
src string The source of the subscriptionReturns Promise<boolean> Resolves with the presence of a subscription when the operation is complete
Subscribes globally for a source with a callback on changes
src string The source of the subscriptioncb function (k: string, v: any, t: PubSubType): void The callback triggered when a publish is triggered on the store* k The key of the subscribed value
v The subscribed valuet The type of triggerReturns Promise<void> Resolves when the operation is complete
Unsubscribes globally for a source
src string The source of the subscriptionReturns Promise<void> Resolves when the operation is complete
Unsubscribes everywhere for a source
src string The source of the subscriptionReturns Promise<void> Resolves when the operation is complete
A static Store builder
Returns Store a new Store
An Enum of string, with following valid values :
sub: triggered on subscription (with now param to true)pub: triggered on force publishset: triggered on setting a new valuedel: triggered on deleting the keyType: string
if (t === PubSubType.sub) {
...
}
A Pub/Sub utility for Store
Checks if a global subscription exists for a source
src string The source of the subscriptionReturns Promise<boolean> Resolves with the presence of a subscription when the operation is complete
Subscribes globally for a source with a callback on changes
src string The source of the subscriptioncb function (k: string, v: any, t: PubSubType): void The callback triggered when a publish is triggered on the store* k The key of the subscribed value
v The subscribed valuet The type of triggerReturns Promise<void> Resolves when the operation is complete
Checks if a subscription exists on a key for a source
Returns Promise<boolean> Resolves with the presence of a subscription when the operation is complete
Subscribes to an entry on a key for a source with a callback on changes
src string The source of the subscriptionk string The key of the subscribed valuecb function (k: string, v: any, t: PubSubType): void The callback triggered when a publish is triggered on a subscribed entry* k The key of the subscribed value
v The subscribed valuet The type of triggerReturns Promise<void> Resolves when the operation is complete
Unsubscribes globally for a source
src string The source of the subscriptionReturns Promise<void> Resolves when the operation is complete
Unsubscribes to an entry on a key for a source
Returns Promise<void> Resolves when the operation is complete
Unsubscribes everywhere for a source
src string The source of the subscriptionReturns Promise<void> Resolves when the operation is complete
Triggers a Publish on the entry for a given key
k string The key of the entryv any The value of the entryt PubSubType The type of publish to send to callbackReturns Promise<void> Resolves when the operation is complete
Triggers a Publish on the entry for a given key for a source
src string The source of the subscriptionk string The key of the entryv any The value of the entryt PubSubType The type of publish to send to callbackReturns Promise<void> Resolves when the operation is complete
A custom Error for this module
message string a base messageparams ...any interesting parameters for error analysisFAQs
A store manager for wool
The npm package wool-store receives a total of 17 weekly downloads. As such, wool-store popularity was classified as not popular.
We found that wool-store demonstrated a healthy version release cadence and project activity because the last version was released less than 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.