MCPcopy Create free account
hub / github.com/SBoudrias/Inquirer.js / errorCode

Function errorCode

tools/package/src/package-json.ts:17–21  ·  view source on GitHub ↗
(error: unknown)

Source from the content-addressed store, hash-verified

15}
16
17function errorCode(error: unknown) {
18 return error && typeof error === 'object' && 'code' in error
19 ? String(error.code)
20 : undefined;
21}
22
23function createRequireFrom(fromDirectory: string) {
24 return Module.createRequire(path.join(fromDirectory, 'package.json'));

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected