MCPcopy Index your code
hub / github.com/darkreader/darkreader / checkDependency

Function checkDependency

tests/dependencies.js:12–21  ·  view source on GitHub ↗
({resolved, integrity})

Source from the content-addressed store, hash-verified

10}
11
12function checkDependency({resolved, integrity}) {
13 if (!(
14 (resolved === undefined ||
15 resolved.startsWith('https://registry.npmjs.org/')) &&
16 (integrity === undefined ||
17 integrity.startsWith('sha512-'))
18 )) {
19 throw new Error('Invalid dependency', resolved);
20 }
21}
22
23/**
24 * Check that every dependency (including transitive dependencies) is hosted on NPM and not

Callers 1

checkDependenciesFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected