import { pLimit } from "./pLimit.mjs";

//#region ../@intlayer/webpack/dist/esm/chokidar/dist/esm/utils/parallelize.mjs
const parallelize = async (items, callback = async (item) => item, parallelLimit = 10) => {
	const limit = pLimit(parallelLimit);
	return Promise.all(items.map((item) => limit(() => callback(item))));
};

//#endregion
export { parallelize };
//# sourceMappingURL=parallelize.mjs.map