Last active
July 6, 2022 16:29
-
-
Save lucatsf/1c4c466e600ef5c382220f34808cd41b to your computer and use it in GitHub Desktop.
Create chunk in javascript
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const chunkSize = 10; | |
for (let i = 0; i < dataLoad.length; i += chunkSize) { | |
const chunk = dataLoad.slice(i, i + chunkSize); | |
//exemplo a baixo | |
await request.post('/data-load', dataLoad) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment