Skip to content

sosoba/is-errno-exception

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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');
}

About

Typescript assercion for Nodejs exceptions

Resources

License

Stars

Watchers

Forks

Packages

No packages published