is-errno-exception
v1.1.0
Published
Typescript assertion for Nodejs exceptions
Downloads
1
Readme
is-errno-exception
Typescript assertion for Nodejs exceptions
Instalaton
npm i --save is-errno-exception
Usage
import { isErrnoException } from 'is-errno-exception';
try {
// ...
} catch (e) {
if (!isErrnoException(e) || e.code !== 'ABORT_ERR') {
throw e;
}
console.log('Aborted');
}