MCPcopy Create free account
hub / github.com/npm/cli / normalizePath

Function normalizePath

workspaces/arborist/test/diff.js:11–11  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

9// for this test and it makes the snapshot unnecessarily noisy.
10
11const normalizePath = path => path.replace(/^\w:/, '').replace(/\\/g, '/')
12const normalizedCWD = normalizePath(process.cwd())
13const formatNode = node =>
14 node && Object.assign(Object.create(node.constructor.prototype), {

Callers 9

diff.jsFile · 0.70
formatNodeFunction · 0.70
pathFunction · 0.70
formatDiffFunction · 0.70
runTestFunction · 0.70
node.jsFile · 0.70
fromPathFunction · 0.70
calc-dep-flags.jsFile · 0.70
crFunction · 0.70

Calls 1

replaceMethod · 0.80

Tested by

no test coverage detected