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 🙏

© 2026 – Pkg Stats / Ryan Hefner

@exodus/feature-flags

v6.2.0

Published

Module for monitoring/controlling the currently available features based on remoteConfig, device geolocation, etc

Readme

@exodus/feature-flags

Modules and atoms for monitoring/controlling the currently available features based on remoteConfig, device geolocation, etc. See also @exodus/feature-control.

Usage

We recommend you use this feature via @exodus/headless, as follows in the below example:

  1. Specify your feature flags when configuring the @exodus/headless instance.
  2. Consume/control feature flags:
  • In your modules/atoms/plugins/features, use the featureFlagAtoms dependency.
  • In the UI:
    • Use the selectors.featureFlags.create(featureFlagName) selector to read the current flag value.
    • Use exodus.featureFlags.enable(featureFlagName) and exodus.featureFlags.disable(featureFlagName) if you need to toggle the flag value at runtime.

See example code below.

background

import createExodus from '@exodus/headless'

const featureFlags = {
  // ... other feature flags,
  dogeMode: {
    localDefaults: {
      // `true` if feature is shipped (available at runtime), `false` otherwise
      available: true,
      // controls whether the feature is enabled by default
      // NOTE: if `available` is false, `enabled` can NOT be true, or you can expect an error
      enabled: true,
    },
    remoteConfig: {
      // path to flag in remote config schema
      path: 'features.dogeMode',
      supportedOverrides: {
        // can be enabled/disabled for all users via remote config
        enabled: true,
        // can be enabled/disabled for users in certain geolocations via remote config
        geolocation: true,
        // can be enabled/disabled for users on certain app versions via remote config
        shutdownSemver: true,
      },
    },
  },
}

const exodusContainer = createExodus({
  port,
  adapters,
  config: {
    // ...,
    featureFlags,
  },
})

const checkDogeModePlugin = {
  id: 'checkDogeModePlugin',
  factory: ({ featureFlagAtoms }) => {
    const onStart = () => {
      featureFlagAtoms.dogeMode?.get().then(({ isOn }) => {
        console.log('>>> is dogeMode enabled?', isOn)
      })
    }

    return {
      onStart,
    }
  },
  dependencies: ['featureFlagAtoms'],
}

exodusContainer.register({
  definition: checkDogeModePlugin,
})

const exodus = exodusContainer.resolve()
// ... continue as usual

UI-side

import selectors from '~/ui/flux/selectors'

const dogeModeFeatureName = 'dogeMode'

const HomePage = () => {
  const dogeMode = useSelector(selectors.featureFlags.create(dogeModeFeatureName))
  useEffect(() => {
    if (Math.random() < 0.001) {
      exodus.featureFlags.enable(dogeModeFeatureName)
    }
  }, [dogeMode])

  return dogeMode?.isOn ? <DogeMode /> : <NormalMode />
}

Usage examples without @exodus/headless

See the examples folder

Components

remoteConfigFeatureFlagAtoms

An atom collection { [featureName]: atom }, where each atom emits the current remote-config value for that feature flag:

{
  isOn: Boolean,
  unavailableStatus: ?String
}

featureFlagAtoms

An atom collection { [featureName]: atom }, where each atom emits the current status of its feature flag:

{
  isOn: Boolean,
  unavailableStatus: ?String
}

featureFlagsAtom

An atom that emits the current status of all feature flags as an object map:

{
  [featureName]: {
    isOn: Boolean,
    unavailableStatus: ?String
  }
}

featureFlags

Module that overrides local values for feature flags based on remoteConfig and geolocation. It writes values to atoms in featureFlagAtoms, but it might be easier to observe the aggregate feature flags atom featureFlagsAtom.