MCPcopy
hub / github.com/vercel/next.js / getPackageName

Function getPackageName

scripts/trace-dd.mjs:19–24  ·  view source on GitHub ↗
(filename)

Source from the content-addressed store, hash-verified

17}
18
19const getPackageName = (filename) => {
20 const match = /.+[\\/]node_modules[\\/]((?:@[^\\/]+[\\/])?[^\\/]+)/.exec(
21 cleanFilename(filename)
22 )
23 return match && match[1]
24}
25
26/**
27 * Create, reports spans recursively with its inner child spans.

Callers 1

reportSpanRecursivelyFunction · 0.70

Calls 2

cleanFilenameFunction · 0.70
execMethod · 0.65

Tested by

no test coverage detected