launchdarkly-js-sdk-common
Advanced tools
Comparing version 5.0.0-alpha.4 to 5.0.0-alpha.5
{ | ||
"name": "launchdarkly-js-sdk-common", | ||
"version": "5.0.0-alpha.4", | ||
"version": "5.0.0-alpha.5", | ||
"description": "LaunchDarkly SDK for JavaScript - common code", | ||
@@ -5,0 +5,0 @@ "author": "LaunchDarkly <team@launchdarkly.com>", |
@@ -6,2 +6,4 @@ /** | ||
*/ | ||
const { commonBasicLogger } = require('./loggers'); | ||
function validKind(kind) { | ||
@@ -93,3 +95,3 @@ return typeof kind === 'string' && kind !== 'kind' && kind.match(/^(\w|\.|-)+$/); | ||
function getContextKeys(context, logger) { | ||
function getContextKeys(context, logger = commonBasicLogger()) { | ||
if (!context) { | ||
@@ -116,6 +118,6 @@ return undefined; | ||
case null: | ||
logger?.warn(`null is not a valid context kind: ${context}`); | ||
logger.warn(`null is not a valid context kind: ${context}`); | ||
break; | ||
case '': | ||
logger?.warn(`'' is not a valid context kind: ${context}`); | ||
logger.warn(`'' is not a valid context kind: ${context}`); | ||
break; | ||
@@ -122,0 +124,0 @@ default: |
@@ -94,1 +94,3 @@ | ||
client.close().then(() => {}); | ||
var contextKeys = ld.getContextKeys(user); |
@@ -987,2 +987,7 @@ /** | ||
export function getContextKeys( | ||
context: LDContext, | ||
logger?: LDLogger, | ||
): {[attribute: string]: string} | undefined; | ||
/** | ||
@@ -989,0 +994,0 @@ * Callback interface for collecting information about the SDK at runtime. |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
435976
10345