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

Function node

test/lib/utils/allow-scripts-prune.js:5–10  ·  view source on GitHub ↗
({ name = 'pkg', version = '1.0.0' } = {})

Source from the content-addressed store, hash-verified

3
4// Minimal registry node: `matches` derives name/version from the resolved URL.
5const node = ({ name = 'pkg', version = '1.0.0' } = {}) => ({
6 name,
7 version,
8 isRegistryDependency: true,
9 resolved: `https://registry.npmjs.org/${name}/-/${name}-${version}.tgz`,
10})
11
12const withScripts = (overrides) => ({ node: node(overrides), hasScripts: true })
13const noScripts = (overrides) => ({ node: node(overrides), hasScripts: false })

Callers 2

withScriptsFunction · 0.70
noScriptsFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected