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

browser-resolve-sync

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

browser-resolve-sync

synchronous resolve algorithm with browser field support

  • 1.0.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
1
Maintainers
1
Weekly downloads
 
Created
Source

browser-resolve-sync Build Status

Node.js resolve algorithm with browser field support.

This is 1:1 port of Roman Shtylman's asynchronous browser-resolve module.

API

resolve(pkg, opts={})

Resolve a module and return the full path.

Options:

  • filename - the calling filename where the require call originated (in the source)
  • paths - require.paths array to use if nothing is found on the normal node_modules recursive walk
  • packageFilter - transform the parsed package.json contents before looking at the "main" field
  • modules - object with module id/name -> path mappings to consult before doing manual resolution (use to provide core modules)
  • extensions - array of file extensions to search in order

License

MIT

Keywords

FAQs

Package last updated on 12 Mar 2014

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