index.js
function () {
    var self = this

    pb.toJSON().enums.forEach(function (e) {
      self[e.name] = e.values
    })

    pb.toJSON().messages.forEach(function (m) {
      var message = {}
      m.enums.forEach(function (e) {
        message[e.name] = e
      })
      message.name = m.name
      message.encode = encoder(m, pb)
      message.decode = decoder(m, pb)
      self[m.name] = message
    })
  }
function () {
    var self = this

    pb.toJSON().enums.forEach(function (e) {
      self[e.name] = e.values
    })

    pb.toJSON().messages.forEach(function (m) {
      var message = {}
      m.enums.forEach(function (e) {
        message[e.name] = e
      })
      message.name = m.name
      message.encode = encoder(m, pb)
      message.decode = decoder(m, pb)
      self[m.name] = message
    })
  }
function ( ) { var self = this pb . toJSON ( ) . enums . forEach ( function ( e ) { self [ e . name ] = e . values } ) pb . toJSON ( ) . messages . forEach ( function ( m ) { var message = { } m . enums . forEach ( function ( e ) { message [ e . name ] = e } ) message . name = m . name message . encode = encoder ( m , pb ) message . decode = decoder ( m , pb ) self [ m . name ] = message } ) }
to not make toString,toJSON enumarable we make a fire-and-forget prototype
to not make toString toJSON enumarable we make a fire - and - forget prototype