onedionys-feature-toggle-utilities
v5.0.0
Published
One Dionys (Feature Toggle Utilities) - Functions to enable or disable features in the application based on certain conditions or parameters.
Downloads
15
Readme
💾 Requirements
Web Browser
- Can be used as an emulator to build applications. Example [Chrome, Firefox, Safari & Opera].Internet
- Because many use CDN and to make it easier to find solutions to all problems.
🎯 How To Use
Example Syntax
const FeatureToggle = require('./src/featureToggle');
const features = {
featureA: true,
featureB: false
};
const featureToggle = new FeatureToggle(features);
console.log(featureToggle.isEnabled('featureA')); // Output: true
console.log(featureToggle.isEnabled('featureB')); // Output: false
console.log(featureToggle.isEnabled('featureC')); // Output: false
Explanation
- This package provides utilities for feature toggling in applications. The
FeatureToggle
class takes a map of feature names and their corresponding states (true for enabled, false for disabled). You can then use theisEnabled()
method to check if a specific feature is enabled or not.
Return Value
isEnabled(featureName)
: Returns a boolean indicating whether the specified feature is enabled or not.
📆 Release Date
- v1.0.0 : 08 March 2024
- v1.0.1 : 11 March 2024
- v4.0.0 : 11 March 2024
- v4.0.1 : 13 March 2024
- v4.0.2 : 18 March 2024
- v5.0.0 : 31 March 2024
🧑 Author
- Facebook : Oned Ionys
- Instagram : @onedionys
- Twitter : @onedionys
- LinkedIn : @onedionys
📝 License
- Copyright © 2024 One Dionys
- One Dionys - Feature Toggle Utilities is an open source project licensed under the MIT license
☕️ Suppport & Donation
Love One Dionys - Feature Toggle Utilities? Support this project by donating or sharing with others in need.
Made with ❤️ One Dionys