code: function processNpmLine(line) {
      if (swig.argv.useYarn) {
        try {
          processYarnLine(line);
        } catch (e) {
          // NOTE: Some output lines come joined together. Splitting them here
          // and processing them one by one.
          if (/\n/.test(line)) {
            const lines = line.split(/\n/);
            lines.forEach((_line) => {
              processYarnLine(_line);
            });
          }
        }
        return;
      }
  
      line = swig.log.strip(line).trim();
  
      swig.log.verbose(line);
  
      let moduleName;
  
      if (regex.requested.test(line)) {
        moduleName = line.replace(regex.requested, '$1');
  
        swig.log.verbose(`${swig.log.padding + swig.log.padding + '→'.white}  ${moduleName}`);
      } else if (regex.installed.test(line)) {
        moduleName = line.replace(regex.installed, '$3 v$4');
  
        if (!_.contains(downloaded, moduleName)) {
          downloaded.push(moduleName);
  
          swig.log(`${swig.log.strip(swig.log.symbols.download).green}  ${moduleName}`);
        }
      } else if (regex.fourohfour.test(line)) {
        swig.log();
        swig.log.error('install', `Module not found: ${line.replace(regex.fourohfour, '$1')}`);
      } else if (regex.noversion.test(line)) {
        swig.log();
        swig.log.error('install', line.replace(regex.noversion, '$1'));
        swig.log('\nTry specifying a different version. use `npm view <module>` to display available versions for a module.\n');
      } else if (regex.error.test(line)) {
        swig.log();
        swig.log.error('install', line.replace(regex.error, '$1'));
      }
    }
docs: processes output from npm install commands