Gathering detailed insights and metrics for resolve-from
Gathering detailed insights and metrics for resolve-from
Gathering detailed insights and metrics for resolve-from
Gathering detailed insights and metrics for resolve-from
Resolve the path of a module like require.resolve() but from a given path
npm install resolve-from
Module System
Unable to determine the module system for this package.
Min. Node Version
Typescript Support
Node Version
NPM Version
140 Stars
30 Commits
13 Forks
7 Watching
1 Branches
7 Contributors
Updated on 15 Nov 2024
Minified
Minified + Gzipped
JavaScript (92.73%)
TypeScript (7.27%)
Cumulative downloads
Total Downloads
Last day
-7.5%
17,347,745
Compared to previous day
Last week
0.7%
101,624,939
Compared to previous week
Last month
14.3%
416,268,853
Compared to previous month
Last year
12.8%
4,192,843,221
Compared to previous year
Resolve the path of a module like
require.resolve()
but from a given path
$ npm install resolve-from
1const resolveFrom = require('resolve-from'); 2 3// There is a file at `./foo/bar.js` 4 5resolveFrom('foo', './bar'); 6//=> '/Users/sindresorhus/dev/test/foo/bar.js'
Like require()
, throws when the module can't be found.
Returns undefined
instead of throwing when the module can't be found.
Type: string
Directory to resolve from.
Type: string
What you would use in require()
.
Create a partial using a bound function if you want to resolve from the same fromDirectory
multiple times:
1const resolveFromFoo = resolveFrom.bind(null, 'foo'); 2 3resolveFromFoo('./bar'); 4resolveFromFoo('./baz');
Available as part of the Tidelift Subscription.
The maintainers of resolve-from and thousands of other packages are working with Tidelift to deliver commercial support and maintenance for the open source dependencies you use to build your applications. Save time, reduce risk, and improve code health, while paying the maintainers of the exact dependencies you use. Learn more.
No vulnerabilities found.
Reason
no binaries found in the repo
Reason
security policy file detected
Details
Reason
no dangerous workflow patterns detected
Reason
license file detected
Details
Reason
0 existing vulnerabilities detected
Reason
Found 7/30 approved changesets -- score normalized to 2
Reason
0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0
Reason
dependency not pinned by hash detected -- score normalized to 0
Details
Reason
detected GitHub workflow tokens with excessive permissions
Details
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
project is not fuzzed
Details
Reason
branch protection not enabled on development/release branches
Details
Reason
SAST tool is not run on all commits -- score normalized to 0
Details
Score
Last Scanned on 2024-11-18
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn More