MCPcopy Index your code
hub / github.com/npmx-dev/npmx.dev / analyzePackage

Function analyzePackage

shared/utils/package-analysis.ts:394–407  ·  view source on GitHub ↗
(
  pkg: ExtendedPackageJson,
  options?: AnalyzePackageOptions,
)

Source from the content-addressed store, hash-verified

392 * Analyze a package and return structured analysis
393 */
394export function analyzePackage(
395 pkg: ExtendedPackageJson,
396 options?: AnalyzePackageOptions,
397): PackageAnalysis {
398 const moduleFormat = detectModuleFormat(pkg)
399 const types = detectTypesStatus(pkg, options?.typesPackage, options?.files)
400
401 return {
402 moduleFormat,
403 types,
404 engines: pkg.engines,
405 createPackage: options?.createPackage,
406 }
407}

Callers 2

[...pkg].get.tsFile · 0.90

Calls 2

detectModuleFormatFunction · 0.85
detectTypesStatusFunction · 0.85

Tested by

no test coverage detected