Function isNonEmptyRecord

  • Validate a non empty record

    Parameters

    • input: unknown

      The raw input

    Returns Validated<Record<string, unknown>>

    Example

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

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