UNPKG

batched-items-accumulator

Version:

A lightweight utility for Node.js projects that accumulates items into fixed-size batches (number-of-items wise), preserving insertion order. Streams items directly into batches at runtime, eliminating the overhead of post-processing a 1D array - a common

69 lines (68 loc) 2 kB
{ "name": "batched-items-accumulator", "version": "1.0.1", "description": "A lightweight utility for Node.js projects that accumulates items into fixed-size batches (number-of-items wise), preserving insertion order. Streams items directly into batches at runtime, eliminating the overhead of post-processing a 1D array - a common approach in other batch or chunk-oriented packages. It abstracts batch management, allowing users to focus on application logic. Ideal for delayed processing tasks such as bulk write operations to databases, blob storage, and batched publishing of Kafka messages.", "repository": { "type": "git", "url": "git+https://github.com/ori88c/batched-items-accumulator.git" }, "contributors": [ "Ori Cohen (https://github.com/ori88c/)" ], "homepage": "https://github.com/ori88c/batched-items-accumulator#readme", "author": "Ori Cohen", "license": "Apache-2.0", "scripts": { "format": "prettier --write \"src/**/*.ts\"", "build": "tsc", "prepare": "npm run build", "test": "jest" }, "keywords": [ "accumulator", "batch", "chunk", "array-chunk", "fixed-chunks", "equal-length-chunks", "equal-length-batches", "accumulate", "batched-items", "batched-elements", "chunked-items", "chunked-elements", "fixed-batch", "fixed-size", "accumulated-items", "batch-management", "stream-items", "data-stream", "runtime-streaming", "delayed-execution", "status-getters", "nodejs", "node-js", "typescript", "ts", "ES2020" ], "engines": { "node": ">=14.5.0" }, "devDependencies": { "@types/jest": "^29.5.12", "jest": "^29.7.0", "prettier": "^3.5.3", "ts-jest": "^29.1.5", "ts-node": "^10.9.2", "typescript": "^5.5.2" }, "types": "./dist/batched-items-accumulator.d.ts", "main": "./dist/batched-items-accumulator.js", "files": [ "src/", "dist/", "README.md", "LICENSE" ] }