MCPcopy Index your code
hub / github.com/cncjs/gcode-parser / parseFile

Function parseFile

src/index.js:277–286  ·  view source on GitHub ↗
(file, options, callback = noop)

Source from the content-addressed store, hash-verified

275// @param {options} options The options object
276// @param {function} callback The callback function
277const parseFile = (file, options, callback = noop) => {
278 if (typeof options === 'function') {
279 callback = options;
280 options = {};
281 }
282 file = file || '';
283 let s = fs.createReadStream(file, { encoding: 'utf8' });
284 s.on('error', callback);
285 return parseStream(s, options, callback);
286};
287
288// @param {string} str The G-code text string
289// @param {options} options The options object

Callers 1

index.test.jsFile · 0.85

Calls 1

parseStreamFunction · 0.85

Tested by

no test coverage detected