Check if a package has a dependency in either devDependencies or dependencies
the name of the package to check for
Optional
version: string = '*'optional version to check for, defaults to any version
Optional
cwd: stringoverride the working directory
Public API for the packageJson namespace