This function allows me to write this codeconst audioOutConfig = new AudioOutConfig();audioOutConfig.setSampleRateHertz(16000);audioOutConfig.setEncoding(AudioOutConfig.Encoding.LINEAR16);audioOutConfig.setVolumePercentage(100);as this codeconst audioOutConfig = config(new AudioOutConfig(), {  sampleRateHertz: 16000,  encoding: AudioOutConfig.Encoding.LINEAR16,  volumePercentage: 100});Is this a bad idea, and is the function I wrote to do it acceptable?function config(obj, opts) {  for (var opt in opts) {    if (opts.hasOwnProperty(opt)) {      obj[`set${opt.charAt(0).toUpperCase() + opt.slice(1)}`](opts[opt]);    }  }  return obj;}
A shim to make make Node GRPC bindings more JavaScript-y
javascript;node.js;meta programming