Set or get an option.

```js
app.option('a', true);
app.option('a');
//=> true
```
@name .option
@param {String} `key` The option name.
@param {*} `value` The value to set.
@return {*} Returns a `value` when only `key` is defined.
@api public
975384
function(key, value) {
    switch (utils.typeOf(key)) {
      case 'object':
        this.visit('option', key);
        break;
      case 'array':
      case 'string':
        if (typeof value === 'undefined') {
          return this.either(key, utils.get(this.defaults, key));
        }
        this.emit('option', key, value);
        utils.set(this.options, key, value);
        break;
      default: {
        throw new TypeError('expected key to be a string, object or array');
      }
    }
    return this;
  }
1193178
def option(self, key=None):
        
        if key is None:
            return self._args.options()

        return self._args.option(key)
532518
function(key, value) {
            this.options[key] = value;
            if(key in this.containerOptions) {
                this.containerOptions[key] = value;
                this.setContainerOption(key, value); 
            } else {
                this.formOptions[key] = value;
                if(this.$form) {
                    this.$form.editableform('option', key, value);  
                }
            }
        }
184778
public function setOption($key, $value)
    {
        if ($value === NULL) {
            unset($this->options[$key]);

        } else {
            $this->options[$key] = $value;
        }

        return $this;
    }
778156
public Object get(Object key) {
        Object val = super.get(key);
        if (val == null && key instanceof Option) {
            val = ((Option)key).defaultValue;
        }

        return val;
    }
877427
def set(key, value)
      UI.crash!("Key '#{key}' must be a symbol. Example :#{key}.") unless key.kind_of?(Symbol)
      option = option_for_key(key)

      unless option
        UI.user_error!("Could not find option '#{key}' in the list of available options: #{@available_options.collect(&:key).join(', ')}")
      end

      option.verify!(value)

      @values[key] = value
      true
    end
298732
function (key, value) {
    var Item = this.get('Item');

    if (!(value instanceof Item)) {
      value = new Item(value);
    }

    value.key = value.key || key;
    var i = this.indexOf(key);

    if (i !== -1) {
      this.items[i] = value;
    } else {
      this.items.push(value);
      this.keyMap[key] = this.items.length - 1;
    }

    this.emit('item', key, value);
    return this;
  }
631238
function (prop, val) {
    if (arguments.length === 1) {
      if (typeof prop === 'string') {
        return utils.get(this.options, prop);
      }
      if (typeof prop === 'object') {
        return this.visit('option', prop);
      }
    }
    utils.set(this.options, prop, val);
    return this;
  }
100802
function ConfigValue(key, value) {
  this.name = ConfigValue.name;
  StoreError.apply(
    this, [null, 'invalid argument \'%s\' for CONFIG SET \'%s\'', value, key]);
}
246172
function (key) {
            var property = this.config[key.toLowerCase()];
            if (property && property.event) {
                return property.value;
            } else {
                return undefined;
            }
        }
707104
function set(key, val, cb) {
  return type(key) != 'object'
    ? localForage.setItem(key, val).then(wrap(cb), cb)
    : Promise.all(Object.keys(key).map(setSubkey)).then(wrap(val), val);

  function setSubkey(subkey, next) {
    return key[subkey] === null
      ? del(subkey, next)
      : set(subkey, key[subkey], next);
  }
}
924826
function set(key, value) {
	if (ns && ns.active) {
		return ns.set(key, value);
	}
}
1275916
function(element, key) {
        var value = element.data((this.keyName + '-' + key).toLowerCase());

        if ($.type(value) === 'undefined') {
            value = this.options[key];
        }

        return value;
    }
856890
function(key, value) {
        var data = {},
            keys,
            first,
            subkey;
        if (key.indexOf(".") > -1) {
            keys = key.split(".");
            first = keys.shift();
            subkey = keys.join(".");
            data[first] = this._set_create_object(subkey, value);
        } else {
            data[key] = value;
        }
        return data;
    }
1068955
function(key, value) {
			var store = this._local.store;

			if (value === undefined) {
				return store.get.call(this, key);
			} else if (value === null) {
				store.remove.call(this, key);
			} else {
				store.set.call(this, key, value);
			}
		}
622376
function setOption(arg)
{
  arg = arg.split('=')

  var key, value

  if(arg.length > 1)
  {
    key   = arg.shift()
    value = arg.join('=')
  }
  else
  {
    key = arg
    value = true
  }

  this[key] = value
}
382678
function getOption(opts, key, def) {
  var value = opts[key];
  return value === undefined ? def : value;
}