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

@pbs/vanna

Package Overview
Dependencies
Maintainers
5
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@pbs/vanna

Feature flagging service client

  • 0.5.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
5
Created
Source

Vanna Javascript (Browser) Client

Introduction

Vanna is an internal feature flagging service used at PBS. It helps deliver new features to users quickly and safely. This is an example client implementation for browser based Javascript.

To learn more about the rationale behind using feature flags, read these articles:

Install

The recommended way to install vanna is through npm.

npm install @pbs/vanna

Setup

After installing vanna, you can import it with your Javascript bundler of choice and setup the client.

import { VannaClient } from "@pbs/vanna";

const client = VannaClient({
  uri: "https://vanna.example.com/project",
  userSegment: "beta-tester",
  fallbacks: {
    "your-feature-slug": false
  }
});

client.on("ready", () => {
  const isFeatureEnabled = client.variation("your-feature-slug", {
    fallback: false
  });

  if (isFeatureEnabled) {
    // Do something if feature is enabled
  } else {
    // Do another thing if feature is disabled
  }
});

Licensing

MIT

FAQs

Package last updated on 24 Jul 2018

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