MCPcopy
hub / github.com/toddbluhm/env-cmd / isLoaderError

Function isLoaderError

src/utils.ts:46–52  ·  view source on GitHub ↗
(error: unknown)

Source from the content-addressed store, hash-verified

44
45/** @returns true if the error is `ERR_UNKNOWN_FILE_EXTENSION` */
46export function isLoaderError(error: unknown): error is Error {
47 return (
48 error instanceof Error &&
49 'code' in error &&
50 error.code === 'ERR_UNKNOWN_FILE_EXTENSION'
51 );
52}

Callers 1

getEnvFileFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected