Installations
npm install top-pkg-dir
Developer Guide
Typescript
Yes
Module System
CommonJS
Min. Node Version
>=10.8.0
Node Version
12.4.0
NPM Version
6.9.0
Releases
Unable to fetch releases
Contributors
Unable to fetch Contributors
Languages
TypeScript (81%)
JavaScript (15.43%)
HTML (3.57%)
Developer
ozum
Download Statistics
Total Downloads
2,975
Last Day
5
Last Week
36
Last Month
217
Last Year
1,047
GitHub Statistics
42 Commits
1 Watching
15 Branches
1 Contributors
Bundle Size
3.71 kB
Minified
1.41 kB
Minified + Gzipped
Package Meta Information
Latest Version
0.0.3
Package Id
top-pkg-dir@0.0.3
Unpacked Size
7.74 kB
Size
3.00 kB
File Count
7
NPM Version
6.9.0
Node Version
12.4.0
Total Downloads
Cumulative downloads
Total Downloads
2,975
Last day
-37.5%
5
Compared to previous day
Last week
-60.4%
36
Compared to previous week
Last month
4.3%
217
Compared to previous month
Last year
107.3%
1,047
Compared to previous year
Daily Downloads
Weekly Downloads
Monthly Downloads
Yearly Downloads
Dependencies
1
top-pkg-dir
Find top most root directory of a Node.js project or npm package.
Example
└─ Development
└─ Projects
└─ project-a
├─ package.json
├─ lib
└─ node_modules
├─ project-b
└─ lib
└─ example.js
example.js
1import topPkgDir from "top-pkg-dir"; 2 3async function() { 4 const topProjectDir = await topPkgDir(); // '/Development/Projects/project-a' 5}
API
topPkgDir(cwd?)
Returns a Promise
for either the top most project root path or undefined
if it couldn't be found.
topPkgDir.sync(cwd?)
Returns the top most project root path or undefined
if it couldn't be found.
cwd
Type: string
Default: process.cwd()
Directory to start from.
No vulnerabilities found.
Reason
no binaries found in the repo
Reason
license file detected
Details
- Info: project has a license file: LICENSE:0
- Info: FSF or OSI recognized license: MIT License: LICENSE:0
Reason
0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0
Reason
Found 0/26 approved changesets -- score normalized to 0
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
security policy file not detected
Details
- Warn: no security policy file detected
- Warn: no security file to analyze
- Warn: no security file to analyze
- Warn: no security file to analyze
Reason
project is not fuzzed
Details
- Warn: no fuzzer integrations found
Reason
branch protection not enabled on development/release branches
Details
- Warn: branch protection not enabled for branch 'master'
Reason
SAST tool is not run on all commits -- score normalized to 0
Details
- Warn: 0 commits out of 4 are checked with a SAST tool
Reason
35 existing vulnerabilities detected
Details
- Warn: Project is vulnerable to: GHSA-67hx-6x53-jw92
- Warn: Project is vulnerable to: GHSA-v88g-cgmw-v5xw
- Warn: Project is vulnerable to: GHSA-93q8-gq69-wqmw
- Warn: Project is vulnerable to: GHSA-grv7-fg5c-xmjg
- Warn: Project is vulnerable to: GHSA-3xgq-45jj-v275
- Warn: Project is vulnerable to: GHSA-gxpj-cx7g-858c
- Warn: Project is vulnerable to: GHSA-w573-4hg7-7wgq
- Warn: Project is vulnerable to: GHSA-ww39-953v-wcq6
- Warn: Project is vulnerable to: GHSA-765h-qjxv-5f44
- Warn: Project is vulnerable to: GHSA-f2jv-r9rf-7988
- Warn: Project is vulnerable to: GHSA-43f8-2h32-f4cj
- Warn: Project is vulnerable to: GHSA-896r-f27r-55mw
- Warn: Project is vulnerable to: GHSA-9c47-m6qq-7p4h
- Warn: Project is vulnerable to: GHSA-p6mc-m468-83gw
- Warn: Project is vulnerable to: GHSA-29mw-wpgm-hmr9
- Warn: Project is vulnerable to: GHSA-35jh-r3h4-6jhm
- Warn: Project is vulnerable to: GHSA-952p-6rrq-rcjv
- Warn: Project is vulnerable to: GHSA-f8q6-p94x-37v3
- Warn: Project is vulnerable to: GHSA-xvch-5gv4-984h
- Warn: Project is vulnerable to: GHSA-5fw9-fq32-wv5p
- Warn: Project is vulnerable to: GHSA-x77j-w7wf-fjmw
- Warn: Project is vulnerable to: GHSA-hj48-42vr-x3v9
- Warn: Project is vulnerable to: GHSA-hrpp-h998-j3pp
- Warn: Project is vulnerable to: GHSA-p8p7-x288-28g6
- Warn: Project is vulnerable to: GHSA-c2qf-rxjj-qqgw
- Warn: Project is vulnerable to: GHSA-g4rg-993r-mgx7
- Warn: Project is vulnerable to: GHSA-jgrx-mgxx-jf9v
- Warn: Project is vulnerable to: GHSA-72xf-g2v4-qvf3
- Warn: Project is vulnerable to: GHSA-w5p7-h5w8-2hfq
- Warn: Project is vulnerable to: GHSA-7p7h-4mm5-852v
- Warn: Project is vulnerable to: GHSA-cf4h-3jhx-xvhq
- Warn: Project is vulnerable to: GHSA-j8xg-fqg3-53r7
- Warn: Project is vulnerable to: GHSA-6fc8-4gx4-v693
- Warn: Project is vulnerable to: GHSA-3h5v-q93c-6h6q
- Warn: Project is vulnerable to: GHSA-c4w7-xm78-47vh
Score
1.7
/10
Last Scanned on 2025-01-20
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