posthog-js
Advanced tools
Comparing version 1.153.0 to 1.154.0
@@ -42,3 +42,3 @@ import { PostHog } from './posthog-core'; | ||
receivedFeatureFlags(response: Partial<DecideResponse>, errorsLoading?: boolean): void; | ||
override(flags: boolean | string[] | Record<string, string | boolean>): void; | ||
override(flags: boolean | string[] | Record<string, string | boolean>, suppressWarning?: boolean): void; | ||
onFeatureFlags(callback: FeatureFlagsCallback): () => void; | ||
@@ -45,0 +45,0 @@ updateEarlyAccessFeatureEnrollment(key: string, isEnrolled: boolean): void; |
{ | ||
"name": "posthog-js", | ||
"version": "1.153.0", | ||
"version": "1.154.0", | ||
"description": "Posthog-js allows you to automatically capture usage and send events to PostHog.", | ||
@@ -5,0 +5,0 @@ "repository": "https://github.com/PostHog/posthog-js", |
@@ -42,3 +42,3 @@ import { PostHog } from './posthog-core'; | ||
receivedFeatureFlags(response: Partial<DecideResponse>, errorsLoading?: boolean): void; | ||
override(flags: boolean | string[] | Record<string, string | boolean>): void; | ||
override(flags: boolean | string[] | Record<string, string | boolean>, suppressWarning?: boolean): void; | ||
onFeatureFlags(callback: FeatureFlagsCallback): () => void; | ||
@@ -45,0 +45,0 @@ updateEarlyAccessFeatureEnrollment(key: string, isEnrolled: boolean): void; |
@@ -296,3 +296,4 @@ var __assign = (this && this.__assign) || function () { | ||
/* | ||
* Override feature flags for debugging. | ||
* Override feature flags on the client-side. Useful for setting non-persistent feature flags, or for testing/debugging | ||
* feature flags in the PostHog app. | ||
* | ||
@@ -303,12 +304,15 @@ * ### Usage: | ||
* - posthog.feature_flags.override(['beta-feature']) | ||
* - posthog.feature_flags.override({'beta-feature': 'variant', 'other-feature': True}) | ||
* - posthog.feature_flags.override({'beta-feature': 'variant', 'other-feature': true}) | ||
* - posthog.feature_flags.override({'beta-feature': 'variant'}, true) // Suppress warning log | ||
* | ||
* @param {Object|Array|String} flags Flags to override with. | ||
* @param {boolean} [suppressWarning=false] Optional parameter to suppress the override warning. | ||
*/ | ||
PostHogFeatureFlags.prototype.override = function (flags) { | ||
PostHogFeatureFlags.prototype.override = function (flags, suppressWarning) { | ||
var _a, _b; | ||
if (suppressWarning === void 0) { suppressWarning = false; } | ||
if (!this.instance.__loaded || !this.instance.persistence) { | ||
return logger.uninitializedWarning('posthog.feature_flags.override'); | ||
} | ||
this._override_warning = false; | ||
this._override_warning = suppressWarning; | ||
if (flags === false) { | ||
@@ -315,0 +319,0 @@ this.instance.persistence.unregister(PERSISTENCE_OVERRIDE_FEATURE_FLAGS); |
{ | ||
"name": "posthog-js", | ||
"version": "1.153.0", | ||
"version": "1.154.0", | ||
"description": "Posthog-js allows you to automatically capture usage and send events to PostHog.", | ||
@@ -5,0 +5,0 @@ "repository": "https://github.com/PostHog/posthog-js", |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
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
7801566
25231
37
10