nodeManagerFor
nodeManagerFor(
root,dir,has,readPackageManagerField):NodeManager|null
The node manager for a directory: the nearest packageManager field or
lockfile, searching from dir up to (and including) root.
Returns null when nothing is found — the npm default for a bare
package.json is the caller’s policy, not this function’s.
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
root | string |
dir | string |
has | (absPath) => boolean |
readPackageManagerField | (absPath) => unknown |
Returns
Section titled “Returns”NodeManager | null