Gathering detailed insights and metrics for launchdarkly-js-client-sdk
Gathering detailed insights and metrics for launchdarkly-js-client-sdk
Gathering detailed insights and metrics for launchdarkly-js-client-sdk
Gathering detailed insights and metrics for launchdarkly-js-client-sdk
@launchdarkly/js-client-sdk-common
LaunchDarkly Client SDK for JavaScript - common code
launchdarkly-js-sdk-common
LaunchDarkly SDK for JavaScript - common code
launchdarkly-react-client-sdk
LaunchDarkly SDK for React
launchdarkly-node-server-sdk
LaunchDarkly Server-Side SDK for Node.js
LaunchDarkly Client-side SDK for Browser JavaScript
npm install launchdarkly-js-client-sdk
Module System
Min. Node Version
Typescript Support
Node Version
NPM Version
113 Stars
1,436 Commits
66 Forks
46 Watching
5 Branches
194 Contributors
Updated on 07 Nov 2024
Minified
Minified + Gzipped
JavaScript (71.63%)
HTML (16.49%)
Shell (7.1%)
TypeScript (4.26%)
CSS (0.53%)
Cumulative downloads
Total Downloads
Last day
-3.2%
202,407
Compared to previous day
Last week
3.5%
1,071,583
Compared to previous week
Last month
19.1%
4,546,832
Compared to previous month
Last year
34.2%
47,671,650
Compared to previous year
2
34
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!
Refer to the SDK documentation for instructions on getting started with using the SDK.
Note: If you are using JavaScript in a non-browser environment, please see our server-side Node.js SDK, client-side Node.js SDK, and Electron SDK.
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 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.
The SDK does not require any particular JavaScript framework. However, if you are using React, there is an add-on to simplify use of the SDK. See react-client-sdk
.
The LaunchDarkly SDK can be used in all major browsers. However, web browsers vary widely in their support of specific features and standards. Three features that are used by the LaunchDarkly SDK that may not be available on every browser are Promise
, EventSource
, and document.querySelectorAll()
. For more information on whether you may need to use a polyfill to ensure compatibility, and how to do so, see "JS SDK requirements and polyfills".
By default, the SDK sends log output to the browser console. There are four logging levels: debug
, info
, warn
, and error
; by default, debug
and info
messages are hidden. See LDOptions.logger
and basicLogger
for more details.
Read our documentation for in-depth instructions on configuring and using LaunchDarkly. You can also head straight to the complete reference guide for this SDK. Additionally, the authoritative full description of all properties, types, and methods is the online TypeScript documentation. If you are not using TypeScript, then the types are only for your information and are not enforced, although the properties and methods are still the same as described in the documentation.
For examples of using the SDK in a simple JavaScript application, see hello-js
and hello-bootstrap
.
We run integration tests for all our SDKs using a centralized test harness. This approach gives us the ability to test for consistency across SDKs, as well as test networking behavior in a long-running application. These tests cover each method in the SDK, and verify that event sending, flag evaluation, stream reconnection, and other aspects of the SDK all behave correctly.
We encourage pull requests and other contributions from the community. Check out our contributing guidelines for instructions on how to contribute to this SDK.
No vulnerabilities found.
Reason
no dangerous workflow patterns detected
Reason
no binaries found in the repo
Reason
0 existing vulnerabilities detected
Reason
security policy file detected
Details
Reason
license file detected
Details
Reason
Found 12/17 approved changesets -- score normalized to 7
Reason
5 commit(s) and 2 issue activity found in the last 90 days -- score normalized to 5
Reason
detected GitHub workflow tokens with excessive permissions
Details
Reason
dependency not pinned by hash detected -- score normalized to 0
Details
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
project is not fuzzed
Details
Reason
Project has not signed or included provenance with any releases.
Details
Reason
SAST tool is not run on all commits -- score normalized to 0
Details
Score
Last Scanned on 2024-11-18
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn More