1.0.0 • Published 3 years ago
feature-flags-constru v1.0.0
Feature flags
Wrapper around feature flags
libraries.
Currently supported implementations:
- Unleash;
Usage
import { FeatureToggleLibrary, init, isEnabled } from 'feature-flags'
async function main() {
await init(FeatureToggleLibrary.Unleash,
{
unleashUrl: UNLEASH_URL,
unleashAppName: UNLEASH_APP_NAME,
unleashInstanceId: UNLEASH_INSTANCE_ID,
unleashApiKey: UNLEASH_API_KEY
}
)
const feature = 'some-toggle'
console.log('feature: ', feature, isEnabled(feature))
}
1.0.0
3 years ago