@nebulaglitch/gcode
Version:
A library to generate gcode output
20 lines (17 loc) • 500 B
JavaScript
import Command from './command.js';
class GcodePrinter {
static print(arr, sb = '') {
arr.forEach((current)=>{
if (current instanceof Command) {
sb += current.toString();
} else if (current instanceof Array) {
sb += '\n';
sb = GcodePrinter.print(current, sb);
}
sb += '\n';
});
return sb;
}
}
export { GcodePrinter as default };
//# sourceMappingURL=gcodeprinter.js.map