function cleanupOptionKey(key) {
  // replace "_foo" with "Foo"
  key = key.replace(/_(\w)/g, match => match[1].toUpperCase());

  // remove leading dashes
  key = key.replace(/^--/, '');

  return key;
}
Convert keys in the form "--foo_bar" or "zing_foo" to "fooBar" or "zingFoo", respectively.

@param {string} key to convert
@return {string}