Function getPackageWithPath

    • Attempts to traverse from filepath to basepath attempting to load package.json along with the package path.

      Note: If malformed data is presented the result will undefined along with a possible error included in the returned object / PackageObjData. Also note that a file may be specified that does not exist and the directory will be resolved. If that directory exists then resolution will continue.

      Parameters

      Returns PackageObjData

      Loaded package.json / path or potentially an error.