Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
function info (plugin) {
var viewArgs = ['view'];
plugin = plugin.shift();
viewArgs.push(plugin);
viewArgs.push('--json');
// check if npm is installed
return fetch.isNpmInstalled()
.then(function () {
return execa('npm', viewArgs)
.then(({ stdout: info }) => {
var pluginInfo = JSON.parse(info);
return pluginInfo;
});
});
}