@jossmac/lil-libs
    Preparing search index...

    Function isErrorLike

    • Guard for error-like objects exposing a string message property.

      • value: unknown

        Unknown value to test.

      true for native Error instances or plain objects with a string message property.

      isErrorLike(new Error("boom")); // true
      isErrorLike({ message: "boom" }); // true
      isErrorLike({ message: 123 }); // false