npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2025 – Pkg Stats / Ryan Hefner

feature-flag-core

v1.0.3

Published

🏁 Turn features on and off like a pro – no magic spells required.🎩✨

Readme

🏁 Feature Flag Core NPM version NPM downloads

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 to 3231 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)

  1. 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.
  2. A/B Testing: Because who doesn’t love seeing what works best? Split users into groups and compare.
  3. Emergency Killswitch: Feature’s broken? Hit the kill switch (no questions asked).
  4. 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.

🎉 And That’s It! You’re Ready to Manage Feature Flags Like a Pro!