@nebulaglitch/gcode
Version:
A library to generate gcode output
24 lines (19 loc) • 637 B
JavaScript
;
Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: 'Module' } });
const command = require('./command.cjs');
class GcodePrinter {
static print(arr, sb = '') {
arr.forEach((current)=>{
if (current instanceof command.default) {
sb += current.toString();
} else if (current instanceof Array) {
sb += '\n';
sb = GcodePrinter.print(current, sb);
}
sb += '\n';
});
return sb;
}
}
exports.default = GcodePrinter;
//# sourceMappingURL=gcodeprinter.cjs.map