communication-react-19
Version:
React library for building modern communication user experiences utilizing Azure Communication Services (React 19 compatible fork)
22 lines • 649 B
JavaScript
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
/**
* Helper function to bucketize a given array of items into buckets of a specified size.
*
* @param arr array to bucketize
* @param bucketSize number of children for each bucket
* @returns nested array of given children
*
* @private
*/
export function bucketize(arr, bucketSize) {
const bucketArray = [];
if (bucketSize <= 0) {
return bucketArray;
}
for (let i = 0; i < arr.length; i += bucketSize) {
bucketArray.push(arr.slice(i, i + bucketSize));
}
return bucketArray;
}
//# sourceMappingURL=overFlowGalleriesUtils.js.map