How to use the @optimizely/js-sdk-utils.find function in @optimizely/js-sdk-utils

To help you get started, we’ve selected a few @optimizely/js-sdk-utils 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 optimizely / javascript-sdk / packages / models / src / models.ts View on Github external
getVariationByKey(key: string): Variation | null {
    return find(this._variations, variation => variation.key === key) || null
  }
github optimizely / javascript-sdk / packages / models / src / models.ts View on Github external
getVariationById(id: string): Variation | null {
    return find(this._variations, variation => variation.id === id) || null
  }
}