lib/util.js
function (service) {
      let s
      const ns = _.values(this.namespaces)
      if (!ns || !ns.length) {
        return s
      }

      for (let i = 0; i < ns.length; i++) {
        const n = ns[i]
        if (n.services[service]) {
          s = n.services[service]
          break
        }
      }

      return s
    }
function (service) {
      let s
      const ns = _.values(this.namespaces)
      if (!ns || !ns.length) {
        return s
      }

      for (let i = 0; i < ns.length; i++) {
        const n = ns[i]
        if (n.services[service]) {
          s = n.services[service]
          break
        }
      }

      return s
    }
function ( service ) { let s const ns = _ . values ( this . namespaces ) if ( ! ns || ! ns . length ) { return s } for ( let i = 0 ; i < ns . length ; i ++ ) { const n = ns [ i ] if ( n . services [ service ] ) { s = n . services [ service ] break } } return s }
Returns the utility descriptor for the service given a servie name.
Assumes there are no duplicate service names within the definition.
@param {String} service name of the service
@return {Object} service utility descriptor
@memberof descriptor
@example
const grpcinspect = require('grpc-inspect')
const grpc = require('grpc')
const pbpath = path.resolve(__dirname, './route_guide.proto')
const proto = grpc.load(pbpath)
const d = grpcinspect(proto)
console.dir(d.service('RouteGuide'))
Returns the utility descriptor for the service given a servie name . Assumes there are no duplicate service names within the definition .