1.8.0 • Published 10 months ago

vwo-fme-node-sdk v1.8.0

Weekly downloads
-
License
Apache-2.0
Repository
github
Last release
10 months ago

VWO Feature Management and Experimentation SDK for Node.js and JavaScript(browser)

npm version License

CI codecov

npm.io

Requirements

  • Node 12+

Installation

# via npm
npm install vwo-fme-node-sdk --save

# via yarn
yarn add vwo-fme-node-sdk

Example

const { init } = require('vwo-fme-node-sdk');

const vwoClient = await init({
  accountId: '123456', // VWO Account ID
  sdkKey: '32-alpha-numeric-sdk-key', // SDK Key
});

// set user context
const userContext = { id: 'unique_user_id' };
// returns a flag object
const getFlag = await vwoClient.getFlag('feature_key', userContext);
// check if flag is enabled
const isFlagEnabled = getFlag.isEnabled();
// get variable
const intVar = getFlag.getVariable('int_variable_key');

// track event
vwoClient.trackEvent('add_to_cart', userContext, eventProperties);

Development Scripts

  1. Install dependencies and bootstrap git-hooks
yarn install
  1. Compile TypeScript code to JavaScript(ES6)
yarn tsc
  1. To run tests:
# for production
yarn run test:prod
# for development
yarn run test:dev

Contributing

Please go through our contributing guidelines

Code of Conduct

Code of Conduct

License

Apache License, Version 2.0

Copyright 2024 Wingify Software Pvt. Ltd.

1.8.0

10 months ago

1.7.0

10 months ago

1.6.0

11 months ago

1.2.0

1 year ago

1.5.2

11 months ago

1.5.1

11 months ago

1.2.4

1 year ago

1.5.0

12 months ago

1.2.3

1 year ago

1.4.0

12 months ago

1.3.1

12 months ago

1.2.2

1 year ago

1.3.0

1 year ago

1.2.1

1 year ago

1.1.0

1 year ago

1.0.1

1 year ago

1.0.0

1 year ago