Skip to content

Commit 9d9ee45

Browse files
committed
Update README.md
1 parent ca4bc58 commit 9d9ee45

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

README.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,16 @@ class GCodeRunner extends GCodeInterpreter {
9292
}
9393

9494
let runner = new GCodeRunner();
95+
96+
// optional event callbacks
97+
runner
98+
.on('data', (data) => {
99+
console.log(data);
100+
})
101+
.on('end', (results) => {
102+
console.log(results);
103+
});
104+
95105
runner.interpretText(GCODE_TEXT, (err, results) => {
96106
});
97107
```

0 commit comments

Comments
 (0)