get-package-type reliably determines if a JavaScript package is an ES module or CommonJS. This is achieved by examining the type field in the package.json, falling back to deeper analysis of the package's JavaScript files when needed. Useful for tools that need to understand module systems, improving compatibility and avoiding runtime errors. Accurate identification of module type allows precise handling of import/export statements and efficient dependency loading.
The npm package get-package-type had only one release, version 0.1.0, in May 2020. Since then, there have been no releases for over five years, including no releases in any month from June 2020 to August 2025. The package appears to be inactive.
The get-package-type npm package experienced substantial download growth from February 2024 to July 2025, peaking at over 158 million downloads. After July 2025 it exprienced a signifficant decrease in the current month. It shows healthy usage throughout the observed period.