hypertune
Version:
[Hypertune](https://www.hypertune.com/) is the most flexible platform for feature flags, A/B testing, analytics and app configuration. Built with full end-to-end type-safety, Git-style version control and local, synchronous, in-memory flag evaluation. Opt
10 lines (8 loc) • 332 B
text/typescript
import { parse } from "jsonito";
import { InitData, jsonitoResponsePrefix } from "../shared";
export default function parseInitResponse(response: string): InitData {
if (response.startsWith(jsonitoResponsePrefix)) {
return parse(response.slice(jsonitoResponsePrefix.length)) as InitData;
}
return JSON.parse(response);
}