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

Function createNoDependencyData

app/composables/usePackageComparison.ts:321–347  ·  view source on GitHub ↗

* Creates mock data for the "What Would James Do?" comparison column. * This represents the baseline of having no dependency at all. * * Uses explicit display markers (NoDependencyDisplay) instead of undefined * to clearly indicate intentional special values vs missing data.

()

Source from the content-addressed store, hash-verified

319 * to clearly indicate intentional special values vs missing data.
320 */
321function createNoDependencyData(): PackageComparisonData {
322 return {
323 package: {
324 name: NO_DEPENDENCY_ID,
325 version: '',
326 description: undefined,
327 },
328 isNoDependency: true,
329 downloads: undefined,
330 totalLikes: undefined,
331 packageSize: 0,
332 directDeps: 0,
333 installSize: {
334 selfSize: 0,
335 totalSize: 0,
336 dependencyCount: 0,
337 },
338 analysis: undefined,
339 vulnerabilities: undefined,
340 metadata: {
341 license: NoDependencyDisplay.DASH,
342 lastUpdated: NoDependencyDisplay.UP_TO_YOU,
343 engines: undefined,
344 deprecated: undefined,
345 },
346 }
347}
348
349/**
350 * Converts a special display marker to its FacetValue representation.

Callers 1

fetchPackagesFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected