🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
Book a DemoInstallSign in
Socket

is-resolvable

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

is-resolvable

Check if a module ID is resolvable with require()

1.1.0
latest
Source
npm
Version published
Weekly downloads
6.3M
27.64%
Maintainers
1
Weekly downloads
 
Created

What is is-resolvable?

The is-resolvable npm package is a utility that checks if a module ID (a string) can be resolved to a valid module using Node.js' resolution algorithm. This can be useful for determining if a module is available for use without actually requiring it.

What are is-resolvable's main functionalities?

Check if a module is resolvable

This feature allows you to check if a given module ID can be resolved to a valid module. It returns true if the module can be resolved and false otherwise.

const isResolvable = require('is-resolvable');

console.log(isResolvable('express')); // true if 'express' is installed
console.log(isResolvable('./local-module')); // true if './local-module' exists

Other packages similar to is-resolvable

Keywords

file

FAQs

Package last updated on 22 Jan 2018

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