whole_func_string: function findPackage(directory) {
    const file = path.resolve(directory, 'package.json')
    if (fs.existsSync(file) && fs.statSync(file).isFile()) {
      return require(file)
    }
  
    const parent = path.resolve(directory, '..')
    return parent === directory ? null : findPackage(parent)
  }
func_code_string: function findPackage(directory) {
    const file = path.resolve(directory, 'package.json')
    if (fs.existsSync(file) && fs.statSync(file).isFile()) {
      return require(file)
    }
  
    const parent = path.resolve(directory, '..')
    return parent === directory ? null : findPackage(parent)
  }
func_documentation_string: Retrieves the main module package.json information.
  
  @param {string} directory
  The directory to start looking in.
  
  @return {Object|null}
  An object containing the package.json contents or NULL if it could not be found.