generate.js
function getVersion (plugin) {
  return new Promise(function (resolve, reject) {
    npm.commands.view([plugin, 'version'], function (err, data) {
      if (err) return reject(err)
      resolve(Object.keys(data)[0])
    })
  })
}
function getVersion (plugin) {
  return new Promise(function (resolve, reject) {
    npm.commands.view([plugin, 'version'], function (err, data) {
      if (err) return reject(err)
      resolve(Object.keys(data)[0])
    })
  })
}
function getVersion ( plugin ) { return new Promise ( function ( resolve , reject ) { npm . commands . view ( [ plugin , 'version' ] , function ( err , data ) { if ( err ) return reject ( err ) resolve ( Object . keys ( data ) [ 0 ] ) } ) } ) }
return last published version of this package
return last published version of this package