Socket
Socket
Sign inDemoInstall

@pbs/vanna

Package Overview
Dependencies
5
Maintainers
5
Versions
7
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    @pbs/vanna

Feature flagging service client


Version published
Weekly downloads
1
Maintainers
5
Install size
65.0 kB
Created
Weekly downloads
 

Readme

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

Last updated on 24 Jul 2018

Did you know?

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc