New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@gooddata/js-utils

Package Overview
Dependencies
Maintainers
43
Versions
156
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@gooddata/js-utils - npm Package Compare versions

Comparing version 3.10.1-alpha-khanh.le-kl-GD-1226-2020-04-06T09-41-13-641Z to 3.10.1-alpha-khanh.le-kl-SD-912-featureFlags-utils-2020-04-07T07-16-16-392Z

src/utils/test/featureFlags.test.ts

7

dist/utils/featureFlags.d.ts
interface IFeatureFlags {
disablePPExperience?: boolean;
enablePPExperience?: boolean;
hidePixelPerfectExperience?: boolean;
platformEdition?: string;
[key: string]: number | boolean | string;
}
export declare function shouldHidePPExperience(featureFlags: IFeatureFlags): boolean;
export declare function isFreemiumEdition(platformEdition: string | undefined): boolean;
export declare function isFreemiumEdition(platformEdition: string): boolean;
export {};

@@ -7,5 +7,7 @@ "use strict";

function shouldHidePPExperience(featureFlags) {
var disablePPExperience = featureFlags.disablePPExperience, enablePPExperience = featureFlags.enablePPExperience, hidePixelPerfectExperience = featureFlags.hidePixelPerfectExperience, platformEdition = featureFlags.platformEdition;
var enablePPExperience = featureFlags.enablePPExperience;
var hidePixelPerfectExperience = featureFlags.hidePixelPerfectExperience;
var platformEdition = featureFlags.platformEdition;
var isFreemiumUser = isFreemiumEdition(platformEdition);
return hidePixelPerfectExperience || disablePPExperience || (isFreemiumUser && !enablePPExperience);
return hidePixelPerfectExperience || (isFreemiumUser && !enablePPExperience);
}

@@ -12,0 +14,0 @@ exports.shouldHidePPExperience = shouldHidePPExperience;

{
"name": "@gooddata/js-utils",
"version": "3.10.1-alpha-khanh.le-kl-GD-1226-2020-04-06T09-41-13-641Z",
"version": "3.10.1-alpha-khanh.le-kl-SD-912-featureFlags-utils-2020-04-07T07-16-16-392Z",
"description": "Various utils shared on GoodData frontend",

@@ -5,0 +5,0 @@ "repository": {

@@ -6,16 +6,15 @@ // (C) 2020 GoodData Corporation

interface IFeatureFlags {
disablePPExperience?: boolean;
enablePPExperience?: boolean;
hidePixelPerfectExperience?: boolean;
platformEdition?: string;
[key: string]: number | boolean | string;
}
export function shouldHidePPExperience(featureFlags: IFeatureFlags): boolean {
const {disablePPExperience, enablePPExperience, hidePixelPerfectExperience, platformEdition } = featureFlags;
const isFreemiumUser = isFreemiumEdition(platformEdition);
const enablePPExperience = featureFlags.enablePPExperience as boolean;
const hidePixelPerfectExperience = featureFlags.hidePixelPerfectExperience as boolean;
const platformEdition = featureFlags.platformEdition as string;
const isFreemiumUser = isFreemiumEdition(platformEdition as string);
return hidePixelPerfectExperience || disablePPExperience || (isFreemiumUser && !enablePPExperience);
return hidePixelPerfectExperience || (isFreemiumUser && !enablePPExperience);
}
export function isFreemiumEdition(platformEdition: string | undefined): boolean {
export function isFreemiumEdition(platformEdition: string): boolean {
if (!platformEdition) {

@@ -22,0 +21,0 @@ return false;

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