UNPKG

@nebulaglitch/gcode

Version:
29 lines (26 loc) 738 B
import Command from '../command.js'; function _define_property(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } class Comment extends Command { toString() { return (this.newline ? '\n' : '') + this.code + ' ' + this.args.join(' ') + ' ]'; } constructor(content, newline = true){ super('['), _define_property(this, "newline", false); this.newline = newline; this.args.push(content.toString()); } } export { Comment as default }; //# sourceMappingURL=comment.js.map