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

bare-module-resolve

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install
b

bare-module-resolve

Low-level module resolution algorithm for Bare

1.0.1
100

Supply Chain Security

100

Vulnerability

76

Quality

92

Maintenance

100

License

Version published
Weekly downloads
68K
32.15%
Maintainers
2
Weekly downloads
 
Created
Issues
1

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