Added new bulk upsert utility.
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
'use strict';
|
||||
|
||||
function chunk(array, chunkSize) {
|
||||
function chunk(array, chunkSize = 1000) {
|
||||
return Array.from({ length: Math.ceil(array.length / chunkSize) })
|
||||
.map((value, index) => array.slice(index * chunkSize, (index * chunkSize) + chunkSize));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user