Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

launchdarkly-react-client-sdk

Package Overview
Dependencies
Maintainers
1
Versions
70
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

launchdarkly-react-client-sdk - npm Package Compare versions

Comparing version 3.0.0-alpha.1 to 3.0.0-alpha.2

2

lib/initLDClient.js

@@ -55,3 +55,3 @@ "use strict";

*/
const initLDClient = (clientSideID, context = { anonymous: true }, options, targetFlags) => __awaiter(void 0, void 0, void 0, function* () {
const initLDClient = (clientSideID, context = { anonymous: true, kind: 'user' }, options, targetFlags) => __awaiter(void 0, void 0, void 0, function* () {
const ldClient = (0, launchdarkly_js_client_sdk_1.initialize)(clientSideID, context, Object.assign(Object.assign({}, wrapperOptions), options));

@@ -58,0 +58,0 @@ return new Promise((resolve) => {

@@ -49,3 +49,3 @@ import { LDClient, LDContext, LDFlagSet, LDOptions } from 'launchdarkly-js-client-sdk';

* A LaunchDarkly context object. If unspecified, an anonymous context
* will be created and used
* with kind: 'user' will be created and used.
*/

@@ -55,3 +55,3 @@ context?: LDContext;

* @deprecated The `user` property will be removed in a future version,
* please update your code to use context instead
* please update your code to use context instead.
*/

@@ -58,0 +58,0 @@ user?: LDContext;

@@ -12,3 +12,3 @@ "use strict";

*/
const getContextOrUser = (config) => { var _a, _b; return (_b = (_a = config.context) !== null && _a !== void 0 ? _a : config.user) !== null && _b !== void 0 ? _b : undefined; };
const getContextOrUser = (config) => { var _a; return (_a = config.context) !== null && _a !== void 0 ? _a : config.user; };
exports.getContextOrUser = getContextOrUser;

@@ -15,0 +15,0 @@ /**

{
"name": "launchdarkly-react-client-sdk",
"version": "3.0.0-alpha.1",
"version": "3.0.0-alpha.2",
"description": "LaunchDarkly SDK for React",

@@ -67,3 +67,3 @@ "author": "LaunchDarkly <team@launchdarkly.com>",

"hoist-non-react-statics": "^3.3.2",
"launchdarkly-js-client-sdk": "^3.0.0-alpha.3",
"launchdarkly-js-client-sdk": "^3.0.0-alpha.5",
"lodash.camelcase": "^4.3.0"

@@ -70,0 +70,0 @@ },

@@ -26,3 +26,3 @@ import { initialize as ldClientInitialize, LDContext, LDFlagSet, LDOptions } from 'launchdarkly-js-client-sdk';

clientSideID: string,
context: LDContext = { anonymous: true },
context: LDContext = { anonymous: true, kind: 'user' },
options?: LDOptions,

@@ -29,0 +29,0 @@ targetFlags?: LDFlagSet,

@@ -51,3 +51,3 @@ import { LDClient, LDContext, LDFlagSet, LDOptions } from 'launchdarkly-js-client-sdk';

* A LaunchDarkly context object. If unspecified, an anonymous context
* will be created and used
* with kind: 'user' will be created and used.
*/

@@ -58,3 +58,3 @@ context?: LDContext;

* @deprecated The `user` property will be removed in a future version,
* please update your code to use context instead
* please update your code to use context instead.
*/

@@ -61,0 +61,0 @@ user?: LDContext;

import { LDClient, LDContext, LDFlagChangeset, LDFlagSet } from 'launchdarkly-js-client-sdk';
import camelCase from 'lodash.camelcase';
import { ProviderConfig } from './types';
import context from './context';

@@ -10,4 +9,3 @@ /**

*/
export const getContextOrUser = (config: ProviderConfig): LDContext | undefined =>
config.context ?? config.user ?? undefined;
export const getContextOrUser = (config: ProviderConfig): LDContext | undefined => config.context ?? config.user;

@@ -14,0 +12,0 @@ /**

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc