Security News
ESLint is Now Language-Agnostic: Linting JSON, Markdown, and Beyond
ESLint has added JSON and Markdown linting support with new officially-supported plugins, expanding its versatility beyond JavaScript.
configcat-common
Advanced tools
ConfigCat is a configuration as a service that lets you manage your features and configurations without actually deploying new code.
The configcat-common npm package is a client library for ConfigCat, a feature flag and configuration management service. It allows developers to manage feature flags and remote configurations in their applications, enabling them to toggle features on and off without deploying new code.
Initialize ConfigCat Client
This feature allows you to initialize the ConfigCat client with your SDK key, which is necessary to interact with the ConfigCat service.
const { createClient } = require('configcat-common');
const client = createClient('YOUR-SDK-KEY');
Get Feature Flag Value
This feature allows you to retrieve the value of a feature flag. The method takes the feature flag key, a default value, and a callback function to handle the retrieved value.
client.getValue('isMyFeatureEnabled', false, (value) => {
console.log('Feature flag value:', value);
});
Get Configuration Value
This feature allows you to retrieve the value of a configuration setting. Similar to feature flags, it takes the configuration key, a default value, and a callback function.
client.getValue('myConfigKey', 'defaultValue', (value) => {
console.log('Configuration value:', value);
});
Set User Context
This feature allows you to set the user context, which can be used to serve different configurations or feature flags based on the user.
const user = { identifier: 'user123', email: 'user@example.com' };
client.setUser(user);
LaunchDarkly is a feature management platform that allows you to control the release of features to users. It offers similar functionality to ConfigCat, such as feature flag management and user targeting. However, LaunchDarkly is generally considered to be more enterprise-focused with additional features like experimentation and advanced analytics.
Unleash is an open-source feature management solution. It provides similar capabilities for managing feature flags and configurations. Unleash is a good alternative for those looking for an open-source solution with a self-hosted option.
Flagr is another open-source feature flagging and A/B testing tool. It allows you to create and manage feature flags and perform A/B testing. Flagr is suitable for teams looking for a customizable and self-hosted feature management solution.
ConfigCat Common library for JavaScript is a shared package that provides the common ConfigCat SDK logic for ConfigCat SDK for Node.js and ConfigCat SDK for JavaScript.
ConfigCat is a feature flag, feature toggle, and configuration management service that lets you launch new features and change your software configuration remotely without actually (re)deploying code. ConfigCat even helps you do controlled roll-outs like canary releases and blue-green deployments.
ConfigCat is a hosted feature flag service. Manage feature toggles across frontend, backend, mobile, desktop apps. Alternative to LaunchDarkly. Management app + feature flag SDKs.
npm install
npm test
Contributions are welcome. For more info please read the Contribution Guideline.
You might run into errors caused by the wrong version of Node.js. To make sure you are using the recommended Node.js version follow these steps.
nvm install
. This will install the compatible version of Node.js.nvm use
. This will use the compatible version of Node.js.FAQs
ConfigCat is a configuration as a service that lets you manage your features and configurations without actually deploying new code.
The npm package configcat-common receives a total of 89,721 weekly downloads. As such, configcat-common popularity was classified as popular.
We found that configcat-common demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 4 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.
Security News
ESLint has added JSON and Markdown linting support with new officially-supported plugins, expanding its versatility beyond JavaScript.
Security News
Members Hub is conducting large-scale campaigns to artificially boost Discord server metrics, undermining community trust and platform integrity.
Security News
NIST has failed to meet its self-imposed deadline of clearing the NVD's backlog by the end of the fiscal year. Meanwhile, CVE's awaiting analysis have increased by 33% since June.