huggingface / transformers.js
Source Code Overview

Analysis scope, overview of main, test, generated, deployment, build, and other code.

Source Code Analysis Scope
Files includes and excluded from analyses
snippet
txt
mjs
gitattributes
prettierignore
Overview of Analyzed Files
Basic stats on analyzed files
Intro
For analysis purposes we separate files in scope into several categories: main, test, generated, deployment and build, and other.

  • The main category contains all manually created source code files that are being used in the production.
  • Files in the main category are used as input for other analyses: logical decomposition, concerns, duplication, file size, unit size, and conditional complexity.
  • Test source code files are used only for testing of the product. These files are normally not deployed to production.
  • Build and deployment source code files are used to configure or support build and deployment process.
  • Generated source code files are automatically generated files that have not been manually changed after generation.
  • While a source code folder may contain a number of files, we are primarily interested in the source code files that are being written and maintained by developers.
  • Files containing binaries, documentation, or third-party libraries, for instance, are excluded from analysis. The exception are third-party libraries that have been changed by developers.

main19228 LOC (11%) 125 files
test10519 LOC (6%) 129 files
generated59988 LOC (36%) 14 files
build and deployment153 LOC (<1%) 1 file
other73473 LOC (44%) 316 files
Main Code
All manually created or maintained source code that defines logic of the product that is run in a production environment.
Explore:   circles  |  sunburst
  • The following criteria are used to filter files:
    • files with paths like ".*".
  • 125 files match defined criteria (19,228 LOC, 100.0% vs. main code):
    • 111 *.js files (17,398 LOC)
    • 14 *.py files (1,830 LOC)
  • " *.js" is biggest, containing 90.48% of LOC.
  • " *.py" is smallest, containing 9.52% of LOC.


*.js17398 LOC (90%) 111 files
*.py1830 LOC (9%) 14 files
Test Code
Used only for testing of the product. Normally not deployed in a production environment.
mjs
Explore:   circles  |  sunburst
  • The following criteria are used to filter files:
    • files with paths like ".*/[Tt]ests/.*".
    • files with paths like ".*/test_.*".
    • files with paths like ".*[.][Tt]est[.].*".
    • files with paths like ".*[.]test[.].*".
    • files with paths like ".*/jest[.][a-zA-Z0-9\.]+".
  • 129 files match defined criteria (10,519 LOC, 54.7% vs. main code):
    • 128 *.js files (10,380 LOC)
    • 1 *.mjs files (139 LOC)
  • " *.js" is biggest, containing 98.68% of LOC.
  • " *.mjs" is smallest, containing 1.32% of LOC.


*.js10380 LOC (98%) 128 files
*.mjs139 LOC (1%) 1 file
Generated Code
Automatically generated files, not manually changed after generation.
Explore:   circles  |  sunburst
  • The following criteria are used to filter files:
    • files with paths like ".*/package[-]lock[.]json".
  • 14 files match defined criteria (59,988 LOC, 312.0% vs. main code). All matches are in *.json files.


*.json59988 LOC (100%) 14 files
Build and Deployment Code
Source code used to configure or support build and deployment process.
Explore:   circles  |  sunburst
  • The following criteria are used to filter files:
    • files with paths like ".*/package[.]json".
    • files with paths like ".*[.]git[a-z]+".
    • files with paths like ".*/[.]gitignore".
    • files with paths like ".*/package[-]lock[.]json".
    • files with paths like ".*([.]|/)webpack([.]|/).*".
    • files with paths like ".*/[.]gitattributes".
  • 1 file matches defined criteria (153 LOC, 0.8% vs. main code). All matches are in *.js files.


*.js153 LOC (100%) 1 file
Other Code
mjs
txt
Explore:   circles  |  sunburst
  • The following criteria are used to filter files:
    • files with paths like ".*/[.]prettierignore".
    • files with paths like ".*[.]json".
    • files with paths like ".*/[Ee]xamples/.*".
    • files with paths like ".*[.]md".
    • files with paths like ".*/README[.][a-z0-9]+".
    • files with paths like ".*/[.]gitignore".
    • files with paths like ".*[.]svg".
    • files with paths like ".*[.]txt".
  • 316 files match defined criteria (73,473 LOC, 382.1% vs. main code):
    • 53 *.json files (60,939 LOC)
    • 115 *.js files (4,519 LOC)
    • 62 *.jsx files (3,996 LOC)
    • 40 *.css files (3,175 LOC)
    • 25 *.html files (547 LOC)
    • 15 *.md files (231 LOC)
    • 1 *.mjs files (56 LOC)
    • 1 *.txt files (6 LOC)
    • 4 *.svg files (4 LOC)
  • " *.json" is biggest, containing 82.94% of LOC.
  • " *.svg" is smallest, containing 0.01% of LOC.


*.json60939 LOC (82%) 53 files
*.js4519 LOC (6%) 115 files
*.jsx3996 LOC (5%) 62 files
*.css3175 LOC (4%) 40 files
*.html547 LOC (<1%) 25 files
*.md231 LOC (<1%) 15 files
*.mjs56 LOC (<1%) 1 file
*.txt6 LOC (<1%) 1 file
*.svg4 LOC (<1%) 4 files
Analyzers
Info about analyzers used for source code examinations.


2025-06-30 09:01