Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

typed-feature-flagging

Package Overview
Dependencies
Maintainers
0
Versions
10
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

typed-feature-flagging

[![NPM Version](https://img.shields.io/npm/v/typed-feature-flagging)](https://www.npmjs.com/package/typed-feature-flagging)

  • 1.1.2
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
0
decreased by-100%
Maintainers
0
Weekly downloads
 
Created
Source

typed-feature-flagging

NPM Version

Goals

  • able to substitute drivers
    • ie Unleash, LaunchDarkly, etc.
  • boolean feature flag (true/false) results
    • upstream driver failures will result in false (disabled)
  • exhaustive list of feature flags are defined ahead of time and typed (enums)
  • each feature flag may have a context type
    • if there was a context for the feature flag it MUST BE provided
    • the context is typed on a per feature flag basis (the user of the library must define the mapping of the feature flag name to the type of its value)

Desired API

Without a Context

enabled(FeatureFlag.WITHOUT_CONTEXT): boolean

If the developer had attempted to provide a context, there should have been a TS lint error indicating that the context value was not needed.

With a Context

enabled(FeatureFlag.WITH_CONTEXT, { ... }): boolean

If the developer had attempted to NOT provide a context, there should have been a TS lint error indicating that the context value was mandatory.

Keywords

FAQs

Package last updated on 24 Sep 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc