diff --git a/index.js b/index.js index bf1ea21..6dd73e4 100644 --- a/index.js +++ b/index.js @@ -21,7 +21,7 @@ function generateSvg(data, config) { } // Split data into chunks for parallel processing - const chunkSize = Math.ceil(data.length / os.cpus().length) // Distribute work by CPU cores + const chunkSize = Math.ceil(data.length / os.cpus().length) // Distribute work by CPU cores const chunks = [] for (let i = 0; i < data.length; i += chunkSize) { @@ -35,19 +35,19 @@ function generateSvg(data, config) { chunk, config, baseEngine, - rubyEngine, - }, + rubyEngine + } }) - worker.on('message', (result) => { + worker.on('message', result => { console.log(result) }) - worker.on('error', (error) => { + worker.on('error', error => { console.error('Worker error:', error) }) - worker.on('exit', (exitCode) => { + worker.on('exit', exitCode => { if (exitCode !== 0) { console.error(`Worker stopped with exit code ${exitCode}`) } @@ -61,7 +61,7 @@ if (!isMainThread) { const fs = require('fs') const svg = require('svg') - chunk.forEach((char) => { + chunk.forEach(char => { const svgContent = svg.wrap( ruby.getBase(baseEngine, char.glyph, config.layout.base), ruby.getRuby(rubyEngine, char.ruby, config.layout.ruby)