code: function defineOption(id, type, names, {read = true, write = true, on = this, values = null} = {}) {
    let get, set
  
    if (read) {
      if (values) {
        get = function get() { return values[this[`get${type}Option`](id)] }
      } else {
        get = function get() { return this[`get${type}Option`](id) }
      }
    }
  
    if (write) {
      if (values) {
        set = function set(val) { this[`set${type}Option`](id, values.indexOf(val)) }
      } else {
        set = function set(val) { this[`set${type}Option`](id, val) }
      }
    }
  
    if (!Array.isArray(on)) on = [on]
  
    for (const name of names) {
      for (const target of on) {
        Object.defineProperty(target.prototype, name, {get, set})
      }
    }
  }
docs: /* Meta function to define new socket/context options.