pkg-types is a lightweight, dependency-free utility for programmatically determining the declared type (e.g., "module", "commonjs", "esnext") of a JavaScript package based on its package.json contents. Analyze the "type" field, "exports" field, and other relevant properties to infer the intended module system. Ideal for build tools, linters, or any application needing to understand how a package is intended to be consumed. It offers accurate insight and helps to streamline module resolution.