CodeQL library for JavaScript/TypeScript
codeql/javascript-all 2.2.1-dev (changelog, source)
Search

Member predicate PackageJson::declaresDependency

Holds if this package declares a dependency (including optional, development and bundled dependencies) on the given version of the given package.

This does not consider peer dependencies, which are semantically different from the other dependency types.

predicate declaresDependency(string pkg, string version)