Function isObject

  • Validate an object

    Parameters

    • input: unknown

      The raw input

    Returns Validated<object>

    Example

    isObject([]) >>
    {
    valid: true,
    parsed: [],
    };

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

    isObject("") >>
    {
    valid: false,
    error: 'Not an object: ""',
    };