launchdarkly / js-sdk-common

Code shared between all LaunchDarkly client-side JS-based SDKs
Other
3 stars 26 forks source link
feature-flags feature-toggles javascript launchdarkly launchdarkly-sdk launchdarkly-sdk-component managed-by-terraform mirror

LaunchDarkly Javascript SDK Core Components

Actions Status

LaunchDarkly overview

LaunchDarkly is a feature management platform that serves trillions of feature flags daily to help teams build better software, faster. Get started using LaunchDarkly today!

Twitter Follow

Overview

This project provides core implementation components for all of the LaunchDarkly client-side SDKs that use JavaScript: the JS (browser) SDK, the React SDK, the client-side Node SDK, and the Electron SDK. Application code should never refer to the launchdarkly-js-sdk-common package directly.

The initialize function in index.js creates the basic client object that all of those SDKs are built upon. The SDK's own initialize function calls this function, providing a "platform" object that defines additional capabilities specific to that SDK, and then optionally decorates the client object with any other public methods or properties it should have. Inasmuch as possible, the SDK code contains only what is necessary to distinguish it from the other JavaScript-based SDKs. For instance, this project contains no browser-specific code; that is all in js-client-sdk.

It also provides TypeScript definitions in index.d.ts which are re-exported or extended by the SDKs, so the Typedoc documentation for the SDKs includes them.

Contributing

We encourage pull requests and other contributions from the community. Check out our contributing guidelines for instructions on how to contribute to this project.

About LaunchDarkly