How to use the launchdarkly-js-sdk-common.version function in launchdarkly-js-sdk-common

To help you get started, we’ve selected a few launchdarkly-js-sdk-common examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github launchdarkly / js-client-sdk / packages / launchdarkly-js-sdk-common / test-types.ts View on Github external
// This file exists only so that we can run the TypeScript compiler in the CI build
// to validate our typings.d.ts file. The code will not actually be run.

import * as ld from 'launchdarkly-js-sdk-common';

const ver: string = ld.version;

const logger: ld.LDLogger = ld.createConsoleLogger("info");
const loggerWithPrefix: ld.LDLogger = ld.createConsoleLogger("info", "prefix");
const userWithKeyOnly: ld.LDUser = { key: 'user' };
const anonUserWithNoKey: ld.LDUser = { anonymous: true };
const user: ld.LDUser = {
  key: 'user',
  secondary: 'otherkey',
  name: 'name',
  firstName: 'first',
  lastName: 'last',
  email: 'test@example.com',
  avatar: 'http://avatar.url',
  ip: '1.1.1.1',
  country: 'us',
  anonymous: true,

launchdarkly-js-sdk-common

LaunchDarkly SDK for JavaScript - common code

Apache-2.0
Latest version published 1 month ago

Package Health Score

80 / 100
Full package analysis