UNPKG

parse-git-patch

Version:
23 lines (22 loc) 576 B
export type ParsedPatchModifiedLineType = { added: boolean; lineNumber: number; line: string; }; export type ParsedPatchFileDataType = { added: boolean; deleted: boolean; beforeName: string; afterName: string; modifiedLines: ParsedPatchModifiedLineType[]; }; export type ParsedPatchType = { hash?: string; authorName?: string; authorEmail?: string; date?: string; message?: string; files: ParsedPatchFileDataType[]; }; declare function parseGitPatch(patch: string): ParsedPatchType | null; export default parseGitPatch;