Function getMeaningfulTypeof

Determines a human-meaningful type for a given value, especially if custom schema types have been added.

If the specified value is null, undefined, a Date, or a primitive (non-object) type, the type is determined directly, which will be one of: 'null', 'undefined', 'Date', 'number', 'boolean', 'bigint', 'function', or 'symbol'.

If the specified value is an object type, this first calls the registered meaningful typeof extractor, if available, and returns the result, if defined. Otherwise, if the value is an array, this returns 'array' or, if not, returns 'object'.

setMeaningfulTypeofExtractor

  • Parameters

    • value: any

    Returns string