check-npm-package-licenses Check the license metadata of a package and its dependencies. check('mocha', '2.2.5', function(error, problems) { problems.some(function(problem) { return problem.message === 'Package commander@2.3.0 has no license metadata.'; }); // => true});