MCPcopy Index your code
hub / github.com/nodejs/node / arb

Function arb

deps/npm/test/lib/utils/check-allow-scripts.js:7–12  ·  view source on GitHub ↗
({ nodes, allowScripts = null, ignoreScripts = false } = {})

Source from the content-addressed store, hash-verified

5
6// Build a minimal "arborist tree" fixture for the walker.
7const arb = ({ nodes, allowScripts = null, ignoreScripts = false } = {}) => ({
8 options: { allowScripts, ignoreScripts },
9 actualTree: {
10 inventory: new Map(nodes.map((n, i) => [`node_modules/${n.name || `n${i}`}`, n])),
11 },
12})
13
14const node = ({
15 name = 'pkg',

Callers 1

Calls 1

mapMethod · 0.65

Tested by

no test coverage detected