lcnsr
Version:
###### Cooper Runyan
11 lines (10 loc) • 358 B
JavaScript
import licenses from './support.js';
export function getLicense(str) {
for (const license of licenses) {
if (license.accessor.test(str))
return license.name;
if (license.accessor.test(str))
return license.name;
}
throw new Error('That license type is not supported (check your spelling) "' + str + '"');
}