@nebulaglitch/gcode
Version:
A library to generate gcode output
33 lines (28 loc) • 875 B
JavaScript
;
Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: 'Module' } });
const command = require('../command.cjs');
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.default {
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());
}
}
exports.default = Comment;
//# sourceMappingURL=comment.cjs.map