@jsdocs-io/extractor
Version:
Analyze and extract the API from npm packages
18 lines (16 loc) • 340 B
text/typescript
export function hasValidLicense({
license,
ignoreLicense = false,
}: {
license?: string;
ignoreLicense?: boolean;
}): boolean {
if (ignoreLicense) {
return true;
}
return (
!!license &&
license.toLowerCase() !== 'unlicensed' &&
!license.toLowerCase().startsWith('see ')
);
}