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

fastify-feature-flags

Package Overview
Dependencies
Maintainers
1
Versions
10
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

fastify-feature-flags

Fastify feature flags plugin

  • 1.0.0
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

fastify-feature-flags

NPM Version Downloads Count Vunerabilities Count Build Status License

Fastify feature flags plugin. By default it has built-in provider for config module. However it could be extended by various plugins that implement simple interface.

ToC

Fastify support

  • v1.x.x - supports >= fastify-1.0.0, including v2.x.x versions.

Installation

npm i fastify-feature-flags --save

Back to top

Features and requirements


  • Requires fastify >=1.0.0.
  • Node.js >=8.9.0.

Back to top

Usage

Add it to your project like regular fastify plugin. Use register method and pass options to it.

const fastify = require('fastify');
const app = fastify();

const ffPlugin = require('fastify-feature-flags');
app.register(ffPlugin, {providers: [new ffPlugin.ConfigProvider()]});

Plugin adds an object with built-in providers and generic provider interface that you can extend. For checking features availability it adds two methods: fastify.featureFlags.isEnabled which returns true or false and fastify.featureFlags.checkEnabled which throws an error if feature is disabled.

Back to top

Docs

See docs.

Back to top

Changelog

See changelog.

Back to top

See also

Back to top

License

Licensed under MIT.

Back to top

FAQs

Package last updated on 23 Apr 2019

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