Skip to content

Commit

Permalink
docs: Add more documentation to a function
Browse files Browse the repository at this point in the history
  • Loading branch information
Roman Seidelsohn committed Oct 13, 2023
1 parent b767852 commit 303b7f7
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion lib/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -540,13 +540,16 @@ exports.init = function init(args, callback) {
* Check if the current license contains (eventually among others) at least one of the allowed licenses
*
* @param {string} currentLicense The current license
* @param {<type>} packageName The package name
* @param {string} packageName The package name
*/
const checkForOnlyAllow = (currentLicense, packageName) => {
if (toCheckforOnlyAllow.length > 0) {
let containsOneOfAllowedPackages = false;

for (const allowedLicense of toCheckforOnlyAllow) {
// "currentLicense" is a longer string that may contain several license names,
// and we check if one of those is a license listed in the "toCheckforOnlyAllow"
// licenses array:
if (currentLicense.includes(allowedLicense)) {
containsOneOfAllowedPackages = true;
break;
Expand Down

0 comments on commit 303b7f7

Please sign in to comment.