Evaluate in your application
SDKs
An SDK evaluates features and variables inside your application, from a datafile it holds in memory and the context you pass. No decision needs a network request.
How evaluation works#
Your application fetches a datafile, creates an SDK instance with it, and asks for values with a context. In JavaScript:
import { createFeaturevisor } from '@featurevisor/sdk'const f = createFeaturevisor({ datafile: datafileContent,})const context = { userId: 'user-4', country: 'nl',}f.isEnabled('checkout', context)f.getVariation('pricing', context)f.getVariable('buyButton', 'label', context)f.getVariable('supportEmail', context)isEnabled reads a flag and getVariation a variation. getVariable reads a feature variable when given a feature and a variable key, and a global variable when given one key. For user-4, a Dutch user, they return:
Other languages have the same calls with their own naming, and some read global variables with a separate method.
Create one instance and reuse it. When a newer datafile arrives, give it to the same instance, as Deployment describes. Check your SDK's datafile API for whether an update merges or replaces, since a merge keeps definitions the new file left out.
The SDK makes no network requests. The context you pass, such as a user's country or plan, stays in your application unless your own code sends it somewhere.
A datafile in a browser or a mobile app can be read by its users. Keep secrets out of it.
Choose an SDK#
- The JavaScript SDK has guides for Node.js and the browser.
- Kotlin uses the Java SDK.
- Major versions differ by language. Supported SDK versions lists the first version of each with v4 support.
- Java packages come from GitHub Packages, which requires authentication even for public packages.
Frameworks#
Framework guides build on the JavaScript SDK, with helpers that fit each framework:
- React and React Native
- Next.js
- Vue.js and Nuxt
- Astro
- Express.js and Fastify
OpenFeature#
If your application already uses OpenFeature, a Featurevisor provider plugs into it. Providers exist for Node.js, browsers, Go, Swift, Java and Kotlin, Ruby, Python, PHP, Rust and Elixir. They are optional. See OpenFeature.


