🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
Sign inDemoInstall
Socket

bare-module-resolve

Package Overview
Dependencies
Maintainers
2
Versions
32
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

bare-module-resolve

Low-level module resolution algorithm for Bare

1.1.0
Source
npm
Version published
Weekly downloads
91K
-2.96%
Maintainers
2
Weekly downloads
 
Created
Source

bare-module-resolve

Low-level module resolution algorithm for Bare.

npm i bare-module-resolve

Usage

const resolve = require('bare-module-resolve')

function readPackage (url) {
  if (url.href === 'file:///directory/package.json') {
    return {
      main: './index.js'
    }
  }

  return null
}

for (const resolution of resolve('./file', new URL('file:///directory/'), { extensions: ['.js'] }, readPackage)) {
  console.log(resolution)
}

License

Apache-2.0

FAQs

Package last updated on 27 Nov 2023

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