@splitsoftware/configs
v1.0.0-beta1
Published
Harness Configs SDK
Readme
Harness Configs SDK for JavaScript
Overview
The Harness Configs SDK is a JavaScript library for serving Configs — standalone, versioned configuration objects that can be evaluated with or without targeting rules.
Compatibility
Requires Node.js version 14.x or later.
Getting started
Below is a simple Node.js example that describes the instantiation and most basic usage of our SDK:
import { ConfigsClient } from '@splitsoftware/configs';
// Instantiate the SDK
const client = ConfigsClient({
sdkKey: 'YOUR_SDK_KEY'
});
// Wait for the SDK to be ready before calling getConfig
client.on(client.Event.SDK_READY, () => {
// Get a config without a target (returns the config's default variant)
const config = client.getConfig('my_config');
console.log(config.variant); // e.g. 'v1'
console.log(config.value); // e.g. { prompt: 'Hello world', temperature: 0.5 }
// Get a config with a target (evaluates targeting rules for the given key and optional attributes)
const configForUser = client.getConfig('my_config', {
key: 'user-123',
attributes: { plan: 'premium' }
});
});Please refer to JavaScript Configs SDK to learn about all the functionality provided by our SDK as well as specifics for each environment and the configuration options available for tailoring it to your current application setup.
Submitting issues
Please use the issue tracker to submit bug reports, feedback, and feature requests.
Contributing
Please see Contributors Guide to find all you need to submit a Pull Request (PR).
License
Licensed under the Apache License, Version 2.0. See: Apache License.
About Split
Split is the leading Feature Delivery Platform for engineering teams that want to confidently deploy features as fast as they can develop them. Split’s fine-grained management, real-time monitoring, and data-driven experimentation ensure that new features will improve the customer experience without breaking or degrading performance. Companies like Twilio, Salesforce, GoDaddy and WePay trust Split to power their feature delivery.
To learn more about Split, contact [email protected], or get started with feature flags for free at https://www.split.io/signup.
Split has built and maintains SDKs for:
- .NET Github Docs
- Android Github Docs
- Angular Github Docs
- Elixir thin-client Github Docs
- Flutter Github Docs
- GO Github Docs
- iOS Github Docs
- Java Github Docs
- JavaScript Github Docs
- JavaScript for Browser Github Docs
- Node.js Github Docs
- PHP Github Docs
- PHP thin-client Github Docs
- Python Github Docs
- React Github Docs
- React Native Github Docs
- Redux Github Docs
- Ruby Github Docs
For a comprehensive list of open source projects visit our Github page.
Learn more about Split:
Visit split.io/product for an overview of Split, or visit our documentation at help.split.io for more detailed information.
