logo
Free, unlimited AI code reviews that run on commit
git-lrc git-lrc GitHub Install Now We'd appreciate a star git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt

Debian::PkgJS::SimpleAudit - Perl module to get security advisories from NPM registry

Description

       Debian::PkgJS::SimpleAudit provides a single function to get security advisories from NPM registry.

   EXPORTadvisories()
           This  function build a query to get all NPM security advisories for the given JS module. It returns a
           string in the same format than ""npm audit"" (emptyifnoadvisoriesareavailable).

           advisories() takes one or two arguments:

           advisories('/path/to/module'): use name and version found in package.json (orpackage.yaml).
           advisories($name,$version): use given module name and version

Name

       Debian::PkgJS::SimpleAudit - Perl module to get security advisories from NPM registry

Synopsis

         use Debian::PkgJS::SimpleAudit;

         my $audit = advisories('/path/to/nodejs/module');
         # OR
         my $audit = advisories('@babel/runtime', '0.7.16');

         if($audit) {
             print STDERR $audit;
             exit 1;
         }

See Also