Function resolvePath

  • Tries to resolve a path from an object.

    Type Parameters

    • T = any

    Parameters

    • pathRootObject: object

      Object that serves as path root.

    • path: Path

      Path as an string or number array.

    Returns {
        resolved: true;
        value: T;
    } | {
        resolved: false;
        value?: undefined;
    }

    An object with { resolved: true, value: T } or { resolved: false }.

    T Returned value type.