UNPKG

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

12 lines (10 loc) 250 B
import { ObjectValue, Value } from "../types"; export default function asPlainObjectOrThrow( value: Value, error: Error ): ObjectValue { if (!value || Array.isArray(value) || typeof value !== "object") { throw error; } return value; }