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
});
You can do the same from the command line with check-npm-package-licenses mocha 2.2.5
.