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