
Security News
Attackers Are Hunting High-Impact Node.js Maintainers in a Coordinated Social Engineering Campaign
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.
cloud-feature-toggles
Advanced tools
Simple implementation of feature toggles that are powered by cloud services.
This module encapsulates all calls to check if a certain feature toggle is enabled. Furthermore, developers can choose a specific cloud service that hosts the feature toggles. Currently the following cloud services are supported:
Object to be passed into module instantiation:
aws - contains all configurations of cloud services under AWS
region - AWS region (e.g. ap-southeast-1)s3 - use this if you want to use AWS S3 to host your feature toggles
bucket - name of S3 bucket that hosts your feature togglesdynamoDB - use this if you want to use AWS DynamoDB to host your feature toggles
tableName - name of DynamoDB table that hosts your feature togglesJSON format that represents the feature toggle:
{
"id": "MY_FEATURE_TOGGLE"
"isEnabled": true
}
Note: For AWS S3 the attribute id is optional as the name of the file would be the name of the feature toggle i.e. MY_FEATURE_TOGGLE
// instantiate module with options object
const cloudFeatureToggles = require('cloud-feature-toggles')({
aws: {
region: '<REGION>', // e.g. ap-southeast-1
s3: {
bucket: '<FEATURE_TOGGLES_BUCKET>' // e.g. my-feature-toggles
}
}
});
// instantiate module with options object
const cloudFeatureToggles = require('cloud-feature-toggles')({
aws: {
region: '<REGION>', // e.g. ap-southeast-1
dynamoDB: {
tableName: '<FEATURE_TOGGLES_TABLE_NAME>' // e.g. my-feature-toggles
}
}
});
Note: featureToggle is case sensitive
const main = async() => {
// use isEnabled method to check if MY_FEATURE_TOGGLE is enabled
// note the await keyword
if (await cloudFeatureToggles.isEnabled('MY_FEATURE_TOGGLE')) {
// continue with MY_FEATURE flow
} else {
// continue with normal flow
}
}
main();
FAQs
Cloud based feature toggles
We found that cloud-feature-toggles 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
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.

Security News
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.