
Security News
/Research
Wallet-Draining npm Package Impersonates Nodemailer to Hijack Crypto Transactions
Malicious npm package impersonates Nodemailer and drains wallets by hijacking crypto transactions across multiple blockchains.
unleash-express
Advanced tools
unleash-client that helps persisting feature toggle results over Express.js
You will need express and cookie-parser:
const express = require('express');
const app = express();
app.use(cookieParser());
const { initialize } = require('unleash-client');
const unleash = initialize(...);
const { UnleashExpress } = require('unleash-express');
const unleashExpress = new UnleashExpress(unleash, options);
Available options:
cookieName
(string): The name of the cookie to persist the result values of each feature toggle. Defaults to 'unleash'cookieOptions
(object): Additionl options for the cookie like expires
or maxAge
. No default.app.use(cookieParser());
app.use(unleashExpress.middleware()); // This will allow reading/setting the cookies
Ask unleash-client
for the value of a feature as usual by using getVariant
.
// In your feature.controller.js
req.unleash.getVariant('feature', ...);
You can also check alternatives or features that are enabled by using isEnabled
.
// In your controller
req.unleash.isEnabled('alternative');
Peek the persisted results:
req.unleash.results['feature']; // Variant object or null
Inspired by fflip-express
FAQs
express helper for unleash
The npm package unleash-express receives a total of 0 weekly downloads. As such, unleash-express popularity was classified as not popular.
We found that unleash-express 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.
Security News
/Research
Malicious npm package impersonates Nodemailer and drains wallets by hijacking crypto transactions across multiple blockchains.
Security News
This episode explores the hard problem of reachability analysis, from static analysis limits to handling dynamic languages and massive dependency trees.
Security News
/Research
Malicious Nx npm versions stole secrets and wallet info using AI CLI tools; Socket’s AI scanner detected the supply chain attack and flagged the malware.