UNPKG

@vercel/flags

Version:

Flags SDK by Vercel - The feature flags toolkit for Next.js and SvelteKit

21 lines (20 loc) 534 B
// src/lib/normalize-options.ts function normalizeOptions(flagOptions) { if (!Array.isArray(flagOptions)) return flagOptions; return flagOptions.map((option) => { if (typeof option === "boolean") return { value: option }; if (typeof option === "number") return { value: option }; if (typeof option === "string") return { value: option }; if (option === null) return { value: option }; return option; }); } export { normalizeOptions }; //# sourceMappingURL=chunk-ZNKTXALY.js.map