Research
Security News
Kill Switch Hidden in npm Packages Typosquatting Chalk and Chokidar
Socket researchers found several malicious npm packages typosquatting Chalk and Chokidar, targeting Node.js developers with kill switches and data theft.
redis-quick-callback
Advanced tools
A redis client that callback immediately when no connection is present.
An enhancement to mranney/node-redis that calls back immediately when no connection is present. When a connection is lost, node-redis
client takes anywhere between 200ms to 2500ms to callback. One way around this to turn off enable_offline_queue
and loose the awesome offline queuing functionality. This client calls back immediately and executes the command asynchronously.
Create a new client using the same API as mranney/node-redis
var redis = require('redis-quick-callback');
var client = redis.createClient();
client.on('ready', function () {
// when no connection exists, err is returned immediately, the "set" is queued
client.set('key', 'value', function (err) {
console.log(err); // Err: No connection to server
});
// when redis connection is back, the queued "set" is executed and the value is available
client.get('key', function (err, data) {
console.log(data); // 'value'
});
});
The code can be built using gulp as follows
$ gulp
Tests require redis to be running at localhost:6379
Run tests using
$ npm test
FAQs
A redis client that callback immediately when no connection is present.
The npm package redis-quick-callback receives a total of 1 weekly downloads. As such, redis-quick-callback popularity was classified as not popular.
We found that redis-quick-callback 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
Security News
Socket researchers found several malicious npm packages typosquatting Chalk and Chokidar, targeting Node.js developers with kill switches and data theft.
Security News
pnpm 10 blocks lifecycle scripts by default to improve security, addressing supply chain attack risks but sparking debate over compatibility and workflow changes.
Product
Socket now supports uv.lock files to ensure consistent, secure dependency resolution for Python projects and enhance supply chain security.