A Twitch.tv viewer reward and games system.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

26 lines
460 B

  1. 'use strict';
  2. var Node = require('./node');
  3. /**
  4. * Initialize a `Text` node with optional `line`.
  5. *
  6. * @param {String} line
  7. * @api public
  8. */
  9. var Text = module.exports = function Text(line) {
  10. this.val = '';
  11. if ('string' == typeof line) this.val = line;
  12. };
  13. // Inherit from `Node`.
  14. Text.prototype = Object.create(Node.prototype);
  15. Text.prototype.constructor = Text;
  16. Text.prototype.type = 'Text';
  17. /**
  18. * Flag as text.
  19. */
  20. Text.prototype.isText = true;