Function isRecord

  • Validate a record

    Parameters

    • input: unknown

      The raw input

    Returns Validated<Record<string, unknown>>

    Example

    isRecord({}) >>
    {
    valid: true,
    parsed: {},
    };

    isRecord([]) >>
    {
    valid: false,
    error: "Not a record: []",
    };