UNPKG

github-folder-tree

Version:

github-folder-tree is a React custom hook that allows you to fetch and process the contents of a GitHub folder. It retrieves information about the files and subfolders in the specified folder, including their names, file types, download URLs, SHA hashes,

10 lines (9 loc) 321 B
import { RepoFile, RepoInfo } from '../types'; export declare const useGitHubFolderTree: (folderUrl: string, apiKey?: string) => { repoFiles: RepoFile[]; fetchRepositoryContents: () => Promise<void>; useGitHubFolderDownload: () => Promise<void>; error: string; log: string; repoInfo: RepoInfo; };