Lightweight JavaScript SDK to read feature flags by repository branch.
getFlags and isFlagEnabled.
main, staging, and feature branches.
import { getFlags, isFlagEnabled } from 'https://flags.salteadorneo.dev/client.js'; Fetches all feature flags for a repository token and branch.
token required repository API tokenbranch required branch nameapiUrl optional endpoint URLconst flags = await getFlags({
token: 'your-token',
branch: 'main'
}); Returns a boolean for a flag key.
flags flags object from getFlagskey flag key to evaluatefallback optional default valueif (isFlagEnabled(flags, 'new_checkout')) {
renderNewCheckout();
} Copy your repository API token
Import the client SDK
Call getFlags with a branch
Gate UI with isFlagEnabled