code: function processResult(result) {
      return {
          whenErrorIs: (errorCode) => {
              if (
                  errorCode === EAUDITNOLOCK &&
                  packageLockHasNotBeenFound(result)
              ) {
                  const summary = result.error.summary || '';
                  result.error.summary = `package.json file is missing or is badly formatted. ${summary}`;
                  return result;
              }
              return result;
          },
      };
  }
docs: Middleware that intercept any input error object.
  This middleware may modify the inital error message
  @param {Object} result -  result of the npm audit command