UNPKG

codeowners-api

Version:

Simple module to interact with github codeowners

14 lines (13 loc) 447 B
"use strict"; exports.__esModule = true; var mapCodeownersFile = function (codeownersFileContent) { return codeownersFileContent .split('\n') .filter(function (x) { return x && !x.startsWith('#'); }) .map(function (x) { var line = x.trim(); var _a = line.split(/\s+/), path = _a[0], owners = _a.slice(1); return { path: path, owners: owners }; }); }; exports["default"] = mapCodeownersFile;