0.5.0 • Published 6 years ago

@pbs/vanna v0.5.0

Weekly downloads
2
License
MIT
Repository
github
Last release
6 years ago

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

0.5.0

6 years ago

0.4.0

6 years ago

0.3.0

6 years ago

0.2.0

6 years ago

0.1.2

6 years ago

0.1.1

6 years ago

0.1.0

6 years ago