pg-copy-streams
Advanced tools
Comparing version 6.0.3 to 6.0.4
@@ -46,5 +46,11 @@ 'use strict' | ||
// Using hybrid approach as advised on https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Function/apply | ||
const QUANTUM = 32768 | ||
for (let i = 0; i < chunks.length; i += QUANTUM) { | ||
this.chunks.push(...chunks.slice(i, Math.min(i + QUANTUM, chunks.length))) | ||
if (this.chunks.length == 0) { | ||
this.chunks = chunks | ||
} else { | ||
// https://stackoverflow.com/questions/22747068/is-there-a-max-number-of-arguments-javascript-functions-can-accept | ||
// 100K seems to be a reasonable size for v8 | ||
const QUANTUM = 125000 | ||
for (let i = 0; i < chunks.length; i += QUANTUM) { | ||
this.chunks.push(...chunks.slice(i, Math.min(i + QUANTUM, chunks.length))) | ||
} | ||
} | ||
@@ -51,0 +57,0 @@ if (this._gotCopyInResponse) { |
{ | ||
"name": "pg-copy-streams", | ||
"version": "6.0.3", | ||
"version": "6.0.4", | ||
"description": "Low-Level COPY TO and COPY FROM streams for PostgreSQL in JavaScript using", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -135,2 +135,3 @@ ## pg-copy-streams | ||
### version 6.0.4 - published 2022-09-05 | ||
### version 6.0.3 - published 2022-09-05 | ||
@@ -137,0 +138,0 @@ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
35869
599
262