
Product
Introducing Tier 1 Reachability: Precision CVE Triage for Enterprise Teams
Socket’s new Tier 1 Reachability filters out up to 80% of irrelevant CVEs, so security teams can focus on the vulnerabilities that matter.
@kablamo/kerosene-feature-flags
Advanced tools
A simple assertion style feature flag for use in CI/CD deployment pipelines, especially well suited to monorepos and Trunk Based Development.
A simple assertion style feature flag for use in CI/CD deployment pipelines, especially well suited to monorepos and Trunk Based Development.
Feature Flags give you the ability to safely enable features in different environments, and for specific cohorts of people.
yarn add @kablamo/kerosene-feature-flags
With a Kerosene Feature Flag you define a flag as an assertion of conditions, and their expected values.
import { flag } from "@kablamo/kerosene-feature-flags";
const flags = {
FEATURE123: flag(c => [
c.condition("environment").must.be.any.of(["development", "staging"]),
c.condition("group").must.be.exactly("users"),
]),
FEATURE42: flag(c => [
c.condition("environment").must.be.exactly("production"),
c.condition("group").must.be.exactly("beta"),
]),
};
export { flags };
When you want to use the flags in your application, you import them, and execute them as a function, passing in an object with runtime information.
import { flags } from "./features";
const runtime = {
environment: "production",
group: "users",
browser: "Firefox",
};
if (flags.FEATURE123(runtime)) {
console.log("New feature");
} else {
console.log("Old feature");
}
// output:
// New feature
if (flags.FEATURE42(runtime)) {
console.log("New feature");
} else {
console.log("Old feature");
}
// output:
// Old feature
FAQs
A simple assertion style feature flag for use in CI/CD deployment pipelines, especially well suited to monorepos and Trunk Based Development.
We found that @kablamo/kerosene-feature-flags demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 5 open source maintainers 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.
Product
Socket’s new Tier 1 Reachability filters out up to 80% of irrelevant CVEs, so security teams can focus on the vulnerabilities that matter.
Research
/Security News
Ongoing npm supply chain attack spreads to DuckDB: multiple packages compromised with the same wallet-drainer malware.
Security News
The MCP Steering Committee has launched the official MCP Registry in preview, a central hub for discovering and publishing MCP servers.