Socket
Socket
Sign inDemoInstall

errno

Package Overview
Dependencies
Maintainers
1
Versions
15
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

errno

libuv errno details exposed


Version published
Maintainers
1
Created

What is errno?

The errno npm package provides a convenient way to create, manage, and interact with system-level errors in Node.js applications. It allows developers to easily look up error codes and create custom errors that integrate seamlessly with Node.js's error handling mechanisms.

What are errno's main functionalities?

Creating custom errors

This feature allows developers to create custom errors. The code sample demonstrates how to create a new custom error type called 'MyError' and then instantiate an error of this type.

const create = require('errno').create;
const MyError = create('MyError');
const err = new MyError('An error occurred');

Looking up error codes

This feature enables developers to look up error codes by their common names. The code sample shows how to access the properties of the 'errno.code' object to find information about the 'ENOENT' error code.

const errno = require('errno');
console.log(errno.code.ENOENT);

Other packages similar to errno

Keywords

FAQs

Package last updated on 07 Jul 2013

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc