@cto.af/utils - v1.2.0
    Preparing search index...

    Function errCode

    • Does the error contain a specific code?

      Parameters

      • e: unknown

        Exception to check.

      • code: string | number

        Code such as 'ENOENT' or -2.

      Returns boolean

      True if code matches.

      On invalid code type.