Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

lodash.iserror

Package Overview
Dependencies
Maintainers
5
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

lodash.iserror

The modern build of lodash’s `_.isError` as a module.

  • 3.0.1
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
162K
decreased by-5.47%
Maintainers
5
Weekly downloads
 
Created

What is lodash.iserror?

The lodash.iserror package is a utility function that checks if a given value is an Error object. This can be useful in various scenarios where you need to validate or handle errors in your code.

What are lodash.iserror's main functionalities?

Error Object Validation

This feature allows you to check if a given value is an Error object. The code sample demonstrates how to use lodash.iserror to validate an Error object and a non-error value.

const isError = require('lodash.iserror');

const error = new Error('This is an error');
const notAnError = 'This is not an error';

console.log(isError(error)); // true
console.log(isError(notAnError)); // false

Other packages similar to lodash.iserror

Keywords

FAQs

Package last updated on 25 Mar 2015

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