(error: unknown)
| 496 | * it has a .code property. |
| 497 | */ |
| 498 | export function isNodeJSErrnoException(error: unknown): error is NodeJS.ErrnoException { |
| 499 | return error !== undefined && (error as NodeJS.ErrnoException).code !== undefined |
| 500 | } |
| 501 | |
| 502 | // TODO: Replace with proper templating system. |
| 503 | export const escapeJSON = (value: cp.Serializable) => JSON.stringify(value).replace(/"/g, """) |
no outgoing calls
no test coverage detected