lib/gngb-api.js
function (service, data) {
  switch (service) {
  case 'gh':
    return data[0].tag_name.replace(/^v/, '');
  case 'npm':
    return data.version;
  case 'gem':
    return data.version;
  case 'bower':
    return data[0].tag_name.replace(/^v/, '');
  default:
    console.log(service + 'not found!');
    break;
  }
}
function (service, data) {
  switch (service) {
  case 'gh':
    return data[0].tag_name.replace(/^v/, '');
  case 'npm':
    return data.version;
  case 'gem':
    return data.version;
  case 'bower':
    return data[0].tag_name.replace(/^v/, '');
  default:
    console.log(service + 'not found!');
    break;
  }
}
function ( service , data ) { switch ( service ) { case 'gh' : return data [ 0 ] . tag_name . replace ( / ^v / , '' ) ; case 'npm' : return data . version ; case 'gem' : return data . version ; case 'bower' : return data [ 0 ] . tag_name . replace ( / ^v / , '' ) ; default : console . log ( service + 'not found!' ) ; break ; } }
Get data and format version
Get data and format version