toggle-kit
Advanced tools
| import { FeatureFlag } from "./FeatureFlag"; | ||
| import { FlagNames } from "./FlagNames"; | ||
| export type FeatureFlagClient<TFlags extends readonly FeatureFlag<any>[]> = { | ||
| isEnabled: (featureName: FlagNames<TFlags>) => boolean; | ||
| }; |
| "use strict"; | ||
| Object.defineProperty(exports, "__esModule", { value: true }); |
+4
-3
@@ -0,7 +1,7 @@ | ||
| import { defineFlags } from "./helpers/defineFlags"; | ||
| import { FeatureFlagClient } from "./types/FeatureFlagClient"; | ||
| import { FeatureFlag } from "./types/FeatureFlag"; | ||
| import { FlagNames } from "./types/FlagNames"; | ||
| import { Property } from "./types/Property"; | ||
| export type FeatureFlagClient<TFlags extends readonly FeatureFlag<any>[]> = { | ||
| isEnabled: (featureName: FlagNames<TFlags>) => boolean; | ||
| }; | ||
| import { Condition } from "./types/Condition"; | ||
| export declare function createFeatureFlagClient<const TProperty extends Property, const TFlags extends readonly FeatureFlag<TProperty>[]>({ property, flags: initialFlags }: { | ||
@@ -13,1 +13,2 @@ property: TProperty; | ||
| }; | ||
| export { defineFlags, type FeatureFlagClient, type Property, type FeatureFlag, type Condition, }; |
+3
-0
| "use strict"; | ||
| Object.defineProperty(exports, "__esModule", { value: true }); | ||
| exports.defineFlags = void 0; | ||
| exports.createFeatureFlagClient = createFeatureFlagClient; | ||
| const defineFlags_1 = require("./helpers/defineFlags"); | ||
| Object.defineProperty(exports, "defineFlags", { enumerable: true, get: function () { return defineFlags_1.defineFlags; } }); | ||
| const isEnabled_1 = require("./helpers/isEnabled"); | ||
@@ -5,0 +8,0 @@ function createFeatureFlagClient({ property, flags: initialFlags }) { |
+1
-1
| { | ||
| "name": "toggle-kit", | ||
| "version": "1.7.4", | ||
| "version": "1.8.0", | ||
| "description": "A feature flag library which runs fully on the service itself, without any dependencies.", | ||
@@ -5,0 +5,0 @@ "main": "./lib/index.js", |
19625
3.34%39
5.41%316
3.61%