input.js 541 B

12345678910111213141516171819202122232425262728293031323334
  1. /**
  2. * input.js - abstract input element for blessed
  3. * Copyright (c) 2013-2015, Christopher Jeffrey and contributors (MIT License).
  4. * https://github.com/chjj/blessed
  5. */
  6. /**
  7. * Modules
  8. */
  9. var Node = require('./node');
  10. var Box = require('./box');
  11. /**
  12. * Input
  13. */
  14. function Input(options) {
  15. if (!(this instanceof Node)) {
  16. return new Input(options);
  17. }
  18. options = options || {};
  19. Box.call(this, options);
  20. }
  21. Input.prototype.__proto__ = Box.prototype;
  22. Input.prototype.type = 'input';
  23. /**
  24. * Expose
  25. */
  26. module.exports = Input;