@webdeveric/utils
    Preparing search index...

    Function assertPathExists

    Assert that path exists on input, optionally checking the value at that path with predicate.

    const input = { a: { b: 1 } };

    assertPathExists(input, 'a.b'); // does not throw
    assertPathExists(input, 'a.b', (value): value is number => typeof value === 'number'); // does not throw
    assertPathExists(input, 'c'); // throws Error: object path (c) does not exist on input