options.js 304 B

1234567891011121314151617
  1. module.exports = exports = function (proto) {
  2. proto._options = {};
  3. proto.options = function setOptions (options) {
  4. var keys = Object.keys(options)
  5. , i = keys.length
  6. , key
  7. while (i--) {
  8. key = keys[i];
  9. this._options[key] = options[key];
  10. }
  11. return this;
  12. }
  13. }