3 views
nvm-sh/nvm
Node Version Manager - POSIX-compliant bash script to manage multiple active node.js versions.
Shell★ 96,175+237 that day#6 on trending
C66.4/100
Duplication67
5.1% in bash, makefile, dockerDead coden/a
the languages dead code reads are under 5% of the codeComplexity66
30.5% The score is jscpd's own --health model: markup, data and text left out, tests kept. The numbers below are the trending scan's.
9.89%duplicated over all files · 3,623 of 36,643 lines
147clones
469files scanned
Most complex files
- nvm.sh1407 cx
- install.sh117 cx
- test/fast/Unit tests/nvm_die_on_prefix91 cx
- test/fast/Unit tests/nvm ls-remote --min59 cx
- test/fast/Unit tests/nvm_remote_version51 cx
- test/fast/Unit tests/nvm_wget_with_auth_header45 cx
- test/common.sh42 cx
- test/fast/Unit tests/nvm_is_valid_version39 cx
- test/installation_node/install while reinstalling packages36 cx
- release-notes.sh34 cx
Dead code 0% unused · 0 findings
No dead code found — everything here is reachable.
Only 9 of the files count as code, too few for a code-only percentage; the numbers above cover every file.
Largest clones in the code
- 25 lines in 2 placesbash122 tokens
129# Emulate curl with wget 130local NVM_DOWNLOAD_WGET_COUNT 131NVM_DOWNLOAD_WGET_COUNT=$# 132local NVM_DOWNLOAD_WGET_SKIP 133NVM_DOWNLOAD_WGET_SKIP=0 134local NVM_DOWNLOAD_WGET_ARG 135for NVM_DOWNLOAD_WGET_ARG in "$@"; do 136 if [ "${NVM_DOWNLOAD_WGET_SKIP}" = '1' ]; then 137 NVM_DOWNLOAD_WGET_SKIP=0 138 continueFirst 10 of 25 lines.
- 29 lines in 2 placesbash98 tokens
6537NVM_NO_COLORS='' 6538local NVM_MIN_VERSION 6539NVM_MIN_VERSION="${NVM_MIN-}" 6540local NVM_MIN_SOURCE 6541NVM_MIN_SOURCE='$NVM_MIN' 6542 6543while [ $# -gt 0 ]; do 6544 case "${1-}" in 6545 --) ;; 6546 --lts)6974PATTERN='' 6975local NVM_MIN_VERSION 6976NVM_MIN_VERSION="${NVM_MIN-}" 6977local NVM_MIN_SOURCE 6978NVM_MIN_SOURCE='$NVM_MIN' 6979while [ $# -gt 0 ]; do 6980 case "${1-}" in 6981 --) ;; 6982 --lts) 6983 NVM_LTS='*'First 10 of 29 lines, the second copy on the right.
- 20 lines in 2 placesbash75 tokens
6290 ;; 6291 *) 6292 if [ -n "$1" ]; then 6293 break 6294 else 6295 shift 6296 fi 6297 ;; # stop processing arguments 6298 esac 6299doneFirst 10 of 20 lines.
6 more
- 11 lines in 2 placesbash74 tokens
- 14 lines in 2 placesbash58 tokens
- 10 lines in 2 placesbash56 tokens
- 9 lines in 2 placesbash55 tokens
- 6 lines in 2 placesbash52 tokens
- 21 lines in 2 placesbash50 tokens
Largest clones over all files, tests and data included
- 522 lines in 2 placestxttests5,086 tokenstest/fast/Unit tests/mocks/nvm ls-remote node.txt:238–759test/fast/Unit tests/mocks/nvm ls-remote.txt:279–800
238v4.0.0 239v4.1.0 240v4.1.1 241v4.1.2 242v4.2.0 [0;37m (LTS: Argon)[0m 243v4.2.1 [0;37m (LTS: Argon)[0m 244v4.2.2 [0;37m (LTS: Argon)[0m 245v4.2.3 [0;37m (LTS: Argon)[0m 246v4.2.4 [0;37m (LTS: Argon)[0m 247v4.2.5 [0;37m (LTS: Argon)[0mFirst 10 of 522 lines.
- 242 lines in 2 placestxttests726 tokenstest/fast/Unit tests/mocks/nvm ls-remote node.txt:1–242test/fast/Unit tests/mocks/nvm_ls_remote.txt:1–242
1v0.1.14 2v0.1.15 3v0.1.16 4v0.1.17 5v0.1.18 6v0.1.19 7v0.1.20 8v0.1.21 9v0.1.22 10v0.1.23First 10 of 242 lines.
- 237 lines in 2 placestxttests711 tokenstest/fast/Unit tests/mocks/nvm ls-remote node.txt:1–237test/fast/Unit tests/mocks/nvm ls-remote.txt:1–237
1v0.1.14 2v0.1.15 3v0.1.16 4v0.1.17 5v0.1.18 6v0.1.19 7v0.1.20 8v0.1.21 9v0.1.22 10v0.1.23First 10 of 237 lines.
- 36 lines in 2 placestxttests649 tokens
- 34 lines in 2 placestxttests613 tokens
By format, code only
| Format | Files | Lines | Clones | Duplicated lines | Duplication |
|---|---|---|---|---|---|
| bash | 9 | 8,499 | 9 | 145 | 1.71% |
By format, all files
| Format | Files | Lines | Clones | Duplicated lines | Duplication |
|---|---|---|---|---|---|
| bash | 420 | 28,075 | 91 | 1,424 | 5.07% |
| txt | 11 | 3,726 | 33 | 1,876 | 50.35% |
| yaml | 17 | 1,975 | 22 | 313 | 15.85% |
| markdown | 12 | 2,450 | 1 | 10 | 0.41% |
| docker | 2 | 136 | 0 | 0 | 0% |
| makefile | 2 | 123 | 0 | 0 | 0% |
| text | 3 | 70 | 0 | 0 | 0% |
| json | 1 | 53 | 0 | 0 | 0% |
| editorconfig | 1 | 35 | 0 | 0 | 0% |
Trending appearances
| Day | Rank | Stars | Files | Lines | Clones | All files | Code | Health | Commit |
|---|---|---|---|---|---|---|---|---|---|
| Nov 19, 2026 | #6 | 96,175 (+237) | 469 | 36,643 | 147 | 9.89% | — | C 66.4 | ad42d90 |
| Nov 13, 2026 | #3 | 96,047 (+63) | 457 | 35,176 | 143 | 10.1% | — | C 66.5 | 09e620c |
| Oct 15, 2026 | #3 | 95,494 (+52) | 391 | 28,674 | 103 | 10.26% | — | B 70.4 | b1b3a00 |
| Sep 6, 2026 | #10 | 94,944 (+22) | 370 | 26,280 | 98 | 10.84% | — | — | ccb49e5 |
Want this for your own project? Install jscpd and run jscpd ., or measure it the way the baselines were measured.