|
| 1 | +# LaunchDarkly JavaScript SDK for Browsers |
| 2 | + |
| 3 | +<!-- |
| 4 | +[![NPM][browser-sdk-npm-badge]][browser-sdk-npm-link] |
| 5 | +[![Actions Status][browser-sdk-ci-badge]][browser-sdk-ci] |
| 6 | +[![Documentation][browser-sdk-ghp-badge]][browser-sdk-ghp-link] |
| 7 | +[![NPM][browser-sdk-dm-badge]][browser-sdk-npm-link] |
| 8 | +[![NPM][browser-sdk-dt-badge]][browser-sdk-npm-link] |
| 9 | +--> |
| 10 | + |
| 11 | +> [!CAUTION] |
| 12 | +> This library is a beta version and should not be considered ready for production use while this message is visible. |
| 13 | +
|
| 14 | +<!-- |
| 15 | +## Install |
| 16 | +
|
| 17 | +```shell |
| 18 | +# npm |
| 19 | +npm i @launchdarkly/js-client-sdk |
| 20 | +
|
| 21 | +# yarn |
| 22 | +yarn add -D @launchdarkly/js-client-sdk |
| 23 | +``` |
| 24 | +--> |
| 25 | + |
| 26 | +## Getting started |
| 27 | + |
| 28 | +Refer to the [SDK documentation](https://docs.launchdarkly.com/sdk/client-side/javascript#getting-started) for instructions on getting started with using the SDK. |
| 29 | + |
| 30 | +Note: _If you are using JavaScript in a non-browser environment, please check our other SDK packages in [js-core](https://github.com/launchdarkly/js-core)_ |
| 31 | +Please note that the JavaScript SDK has two special requirements in terms of your LaunchDarkly environment. First, in terms of the credentials for your environment that appear on your [Account Settings](https://app.launchdarkly.com/settings/projects) dashboard, the JavaScript SDK uses the "Client-side ID"-- not the "SDK key" or the "Mobile key". Second, for any feature flag that you will be using in JavaScript code, you must check the "Make this flag available to client-side SDKs" box on that flag's Settings page. |
| 32 | + |
| 33 | +## Verifying SDK build provenance with the SLSA framework |
| 34 | + |
| 35 | +LaunchDarkly uses the [SLSA framework](https://slsa.dev/spec/v1.0/about) (Supply-chain Levels for Software Artifacts) to help developers make their supply chain more secure by ensuring the authenticity and build integrity of our published SDK packages. To learn more, see the [provenance guide](PROVENANCE.md). |
| 36 | + |
| 37 | +## About LaunchDarkly |
| 38 | + |
| 39 | +- LaunchDarkly is a continuous delivery platform that provides feature flags as a service and allows developers to iterate quickly and safely. We allow you to easily flag your features and manage them from the LaunchDarkly dashboard. With LaunchDarkly, you can: |
| 40 | + - Roll out a new feature to a subset of your users (like a group of users who opt-in to a beta tester group), gathering feedback and bug reports from real-world use cases. |
| 41 | + - Gradually roll out a feature to an increasing percentage of users, and track the effect that the feature has on key metrics (for instance, how likely is a user to complete a purchase if they have feature A versus feature B?). |
| 42 | + - Turn off a feature that you realize is causing performance problems in production, without needing to re-deploy, or even restart the application with a changed configuration file. |
| 43 | + - Grant access to certain features based on user attributes, like payment plan (eg: users on the ‘gold’ plan get access to more features than users in the ‘silver’ plan). |
| 44 | + - Disable parts of your application to facilitate maintenance, without taking everything offline. |
| 45 | +- LaunchDarkly provides feature flag SDKs for a wide variety of languages and technologies. Read [our documentation](https://docs.launchdarkly.com/sdk) for a complete list. |
| 46 | +- Explore LaunchDarkly |
| 47 | + - [launchdarkly.com](https://www.launchdarkly.com/ 'LaunchDarkly Main Website') for more information |
| 48 | + - [docs.launchdarkly.com](https://docs.launchdarkly.com/ 'LaunchDarkly Documentation') for our documentation and SDK reference guides |
| 49 | + - [apidocs.launchdarkly.com](https://apidocs.launchdarkly.com/ 'LaunchDarkly API Documentation') for our API documentation |
| 50 | + - [blog.launchdarkly.com](https://blog.launchdarkly.com/ 'LaunchDarkly Blog Documentation') for the latest product updates |
| 51 | + |
| 52 | +[browser-sdk-ci-badge]: https://github.com/launchdarkly/js-core/actions/workflows/browser.yml/badge.svg |
| 53 | +[browser-sdk-ci]: https://github.com/launchdarkly/js-core/actions/workflows/browser.yml |
| 54 | +[browser-sdk-npm-badge]: https://img.shields.io/npm/v/@launchdarkly/js-client-sdk.svg?style=flat-square |
| 55 | +[browser-sdk-npm-link]: https://www.npmjs.com/package/@launchdarkly/js-client-sdk |
| 56 | +[browser-sdk-ghp-badge]: https://img.shields.io/static/v1?label=GitHub+Pages&message=API+reference&color=00add8 |
| 57 | +[browser-sdk-ghp-link]: https://launchdarkly.github.io/js-core/packages/sdk/browser/docs/ |
| 58 | +[browser-sdk-dm-badge]: https://img.shields.io/npm/dm/@launchdarkly/js-client-sdk.svg?style=flat-square |
| 59 | +[browser-sdk-dt-badge]: https://img.shields.io/npm/dt/@launchdarkly/js-client-sdk.svg?style=flat-square |
0 commit comments