sdk-flags

1.0.4 • Public • Published

SDK piccininno-sanes

###This SDK contains a function called getEvaluation() that requires the follow parameters: userId, flag_token.

First, we need a file that consumes this SDK. Let's call it, sdkConsumer.mjs ##Important: The next example uses the flag --experimental-modules to enable features for loading ESM modules. If you dont wish to install this flag, you have to change the line:

import { getEvaluation } from 'sdk-flags';

to:

const { getEvaluation } = require('sdk-flags');

Copy & paste this code into your file:

import { getEvaluation } from 'sdk-flags';

async function main() {
  const userId = 0; //here you put your userId number
  const flagId = '000000'; //here the flag's token you are looking to evaluate
  const response = await getEvaluation(userId, flagId);
  return response;
}
main();

##About the implementation: Link to Medium to learn about Modules

Readme

Keywords

none

Package Sidebar

Install

npm i sdk-flags

Weekly Downloads

0

Version

1.0.4

License

ISC

Unpacked Size

6.5 kB

Total Files

6

Last publish

Collaborators

  • patsanes