UNPKG

@nebulaglitch/gcode

Version:
20 lines (17 loc) 500 B
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