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

node-resolve

Package Overview
Dependencies
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

node-resolve

Locate modules using the Node resolution algorithm, for using third party modules in node_modules

  • 1.3.4
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

node-resolve

NPM version Downloads Build Status Dependency status Dev Dependency status Coverage Status

Locate modules using the Node resolution algorithm, for using third party modules in node_modules.

v1.3.x breaking change, you have to pass a 'cwd' to resolve, '.' is default.

var nodeResolve = require('node-resolve');

nodeResolve.resolve('src/index.js', './foo/foo', '.');// src/foo/foo.js
nodeResolve.resolve('src/index.js', 'babel-core', '.');// node_modules/babel-core/index.js

undefined is returned if not found, and null is returned if it's a builtin module(fs,path...).

node-resolve supports browser spec.

nodeResolve.resolve('src/index.js', 'inherits', '.', true)// inherits_browser.js
nodeResolve.resolve('src/index.js', 'fs', '.', true)// undefiend

Keywords

FAQs

Package last updated on 03 Dec 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

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