Function getPackage

    • Attempts to traverse from filepath to basepath attempting to load package.json.

      Note: If malformed data is presented the result will undefined. 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 object | undefined

      Loaded package.json or undefined if an error has occurred or basepath or root directory has been reached.