linguist-js
Version:
Analyse the programming languages used in a folder or from raw content, using the same rules that GitHub Linguist does.
18 lines (17 loc) • 500 B
TypeScript
import * as T from '../types';
export type FlagAttributes = {
'vendored': boolean | null;
'generated': boolean | null;
'documentation': boolean | null;
'detectable': boolean | null;
'binary': boolean | null;
'language': T.LanguageResult;
};
export type ParsedGitattributes = Array<{
glob: T.FileGlob;
attrs: FlagAttributes;
}>;
/**
* Parses a gitattributes file.
*/
export default function parseAttributes(content: string, folderRoot?: string): ParsedGitattributes;