@syncot/error
Advanced tools
Comparing version 0.0.3 to 0.0.4
@@ -104,1 +104,6 @@ export interface ErrorDetails { | ||
export declare function isDuplicateIdError(error: any): error is DuplicateIdError; | ||
export interface InvalidStreamError extends Error { | ||
name: 'SyncOtError InvalidStream'; | ||
} | ||
export declare function createInvalidStreamError(message?: string): InvalidStreamError; | ||
export declare function isInvalidStreamError(error: any): error is InvalidStreamError; |
@@ -189,1 +189,10 @@ import { strict as assert } from 'assert'; | ||
} | ||
export function createInvalidStreamError(message) { | ||
return createError({ | ||
message, | ||
name: 'SyncOtError InvalidStream', | ||
}); | ||
} | ||
export function isInvalidStreamError(error) { | ||
return error instanceof Error && error.name === 'SyncOtError InvalidStream'; | ||
} |
{ | ||
"name": "@syncot/error", | ||
"version": "0.0.3", | ||
"version": "0.0.4", | ||
"description": "Helpers for managing errors.", | ||
@@ -30,3 +30,3 @@ "keywords": [ | ||
}, | ||
"gitHead": "bd4d64ce07f354f6123f71b6f6ba0796bc5b198b" | ||
"gitHead": "2b86fbb78a4b4b2f16fe3ed00ca08851bcc74e5c" | ||
} |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
13450
307