Package Exports
- feature-flag-core
- feature-flag-core/dist/index.js
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (feature-flag-core) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
๐ Feature Flag Core

Managing features in your app is like juggling flaming swords. One wrong move, and itโs chaos. But with Feature Flag Core, you can tame those swords and keep everything in control without burning yourself out. ๐ฅ This manager really does the heavy lifting. THIS Manager ;)
๐ค What is Feature Flag Core?
Glad you asked! Itโs the superhero of feature flags โ think of it as the Swiss Army Knife for all your flag needs. You get a slick UI to toggle features, a local backend to keep things in check, and a hook to easily consume your flags in your app. Oh, and did we mention you can do all of this without breaking a sweat? ๐
๐ Features (AKA, Whatโs In It for You?)
- UI for Flag Management: See all your flags in one place. Toggle them on, off, or somewhere in between (just like your mood on a Monday).
- Local Backend: Running your own local backend so youโre not at the mercy of some third-party service. Control is ๐.
- Easy Setup: Just a couple of imports and boom โ youโre in business.
- Port Customization: You can set it to any port (because we know you like options). Donโt let the port dictate your life. ๐
๐งโ๐ป How to Use It (AKA, Get It Up and Running in T-30 seconds or Less)
1. Set Up the Feature Flag Core UI
First, install the module and add the UI:
npm install feature-flag-core
Now import the magic:
import { FeatureFlagManager } from 'feature-flag-core'
import "feature-flag-core/dist/src/ui/toggleStyles.css"
Then, just place it in your app like this:
<FeatureFlagManager />
Demo

๐ Optional Props:
customUrl
: Want to use a custom backend URL? Go wild. (This will override the port.)port
: Specify the port for the backend. (Defaults to3231
because we like symmetry.)
2. Use Flags in Your App (AKA, How to Stop Thinking and Let the Code Do the Work)
Now that the UI is up and running, consuming flags is as easy as ordering pizza ๐:
import { useFlagFromApi } from 'feature-flag-core'
const flagValue = useFlagFromApi("your-flag-name")
This will give you a true
or false
value based on the flagโs state. Itโs like flipping a switch, but without the annoying light flicker.
3. Start Your Local Backend (AKA, The Magic That Makes It All Happen)
You need a backend to manage those flags. Fire it up with:
npx feature-flag-cli
Or if youโre feeling fancy and need a custom port:
npx feature-flag-cli --port <yourPortNumber>
By default, it runs on port 3231
because, well, weโre into simplicity. But hey, you do you.
Feature Flag Core is here to save your life (or at least your production environment). It gives you the power to turn features on or off without a commit, without a deploy, and without begging for forgiveness later. ๐
๐ค Why Should You Care?
Letโs be real. You donโt want to deploy every single time you want to turn a feature on or off. With Feature Flag Core, you can:
- Control: The flags are in your hands. No more guessing.
- Test: Gradually roll out new features to specific users. Itโs like A/B testing without the messy spreadsheets.
- React Fast: Features can be switched off at a momentโs notice, so if something goes wrong, you can recover faster than a cat falling off a counter.
- Flexibility: Run it locally, customize it, and make it work how you want.
๐งฉ Use Cases (AKA, When Youโll Actually Need This)
- Feature Testing: Want to test that shiny new feature? Turn it on for a few users before rolling it out to everyone. Baby steps, people.
- A/B Testing: Because who doesnโt love seeing what works best? Split users into groups and compare.
- Emergency Killswitch: Featureโs broken? Hit the kill switch (no questions asked).
- Gradual Rollouts: Want to release a feature to 5% of your users? Now you can! Because being subtle is in.
๐งโ๐ป Author (AKA, The Flag Whisperer)
This whole thing was crafted by cinfinit, a developer who got tired of feature flags being more like feature landmines (one wrong step and boom โ chaos). Iโm here to make your life easier, one toggle at a time.
When Iโm not building tools that save you from feature flag Armageddon, Iโm probably either:
Explaining to my laptop that we can get through this together โ
Contemplating lifeโs biggest mysteries, like โWhy does npm start always seem to take longer than npm install?โ Well, it's because someone might have messed up the bundle. Someone , I didnt said me .
Or pretending to be productive while watching "how to make better dev tools" videos (we all do it).
Feel free to hit me up with feature requests, bug reports, or if you just want to share your latest meme discovery. I'm always game for a good laugh... or just another talk.