lib/gngb-api.js
function (service, name, user) {
  //
  var services = [];
  //
  services['gh'] = 'https://api.github.com/repos/:user/:name/releases';
  services['npm'] = 'http://registry.npmjs.org/:name/latest';
  services['gem'] = 'https://rubygems.org/api/v1/gems/:name.json';
  services['bower'] = 'https://api.github.com/repos/:user/:name/releases';

  var str = services[service].replace(':name', name).replace(':user', user);
  //
  return str;

}
function (service, name, user) {
  //
  var services = [];
  //
  services['gh'] = 'https://api.github.com/repos/:user/:name/releases';
  services['npm'] = 'http://registry.npmjs.org/:name/latest';
  services['gem'] = 'https://rubygems.org/api/v1/gems/:name.json';
  services['bower'] = 'https://api.github.com/repos/:user/:name/releases';

  var str = services[service].replace(':name', name).replace(':user', user);
  //
  return str;

}
function ( service , name , user ) { // var services = [ ] ; // services [ 'gh' ] = 'https://api.github.com/repos/:user/:name/releases' ; services [ 'npm' ] = 'http://registry.npmjs.org/:name/latest' ; services [ 'gem' ] = 'https://rubygems.org/api/v1/gems/:name.json' ; services [ 'bower' ] = 'https://api.github.com/repos/:user/:name/releases' ; var str = services [ service ] . replace ( ':name' , name ) . replace ( ':user' , user ) ; // return str ; }
Get formated service url
Get formated service url