Skip to content

Commit

Permalink
refactor(cli): replaces deprecated substr with substring
Browse files Browse the repository at this point in the history
  • Loading branch information
sverweij committed Apr 14, 2023
1 parent 521ffe0 commit cd7eff7
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/cli/utl/io.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,9 @@ function writeToStdOut(pString, pBufferSize = PIPE_BUFFER_SIZE) {

/* eslint no-plusplus: 0 */
for (lIndex = 0; lIndex < lNumberOfChunks; lIndex++) {
const lChunkStart = lIndex * pBufferSize;
process.stdout.write(
pString.substr(lIndex * pBufferSize, pBufferSize),
pString.substring(lChunkStart, lChunkStart + pBufferSize),
"utf8"
);
}
Expand Down

0 comments on commit cd7eff7

Please sign in to comment.