fix(functions): SplitIntoChunks => splitIntoChunks

to comply with internal naming convention
This commit is contained in:
2024-03-12 18:45:50 +02:00
parent 2a359099ba
commit 85f365c528
3 changed files with 14 additions and 10 deletions

View File

@@ -1 +1,5 @@
@resultium/utils / [Exports](modules.md) @resultium/utils / [Exports](modules.md)
# @resultium/utils
Utility package collecting various reusable functions used within Resultium projects

View File

@@ -45,7 +45,7 @@ array of chunks
#### Defined in #### Defined in
functions/splitIntoChuks.ts:8 functions/splitIntoChuks.ts:27
___ ___
@@ -69,7 +69,7 @@ new string
#### Defined in #### Defined in
functions/capitalizeFirstChar.ts:7 functions/capitalizeFirstChar.ts:26
___ ___
@@ -93,7 +93,7 @@ new string
#### Defined in #### Defined in
functions/classNames.ts:7 functions/classNames.ts:26
___ ___
@@ -118,7 +118,7 @@ new string
#### Defined in #### Defined in
functions/conditionalJoin.ts:8 functions/conditionalJoin.ts:27
___ ___
@@ -147,7 +147,7 @@ uses JSON.stringify()
#### Defined in #### Defined in
functions/isDeepWeakEqual.ts:10 functions/isDeepWeakEqual.ts:29
___ ___
@@ -177,7 +177,7 @@ Returns only integers
#### Defined in #### Defined in
functions/randomInRange.ts:12 functions/randomInRange.ts:31
___ ___
@@ -212,7 +212,7 @@ This method doesn't support deep comparements.
#### Defined in #### Defined in
functions/removeFromArrayByKeyValue.ts:11 functions/removeFromArrayByKeyValue.ts:30
___ ___
@@ -243,7 +243,7 @@ new object
#### Defined in #### Defined in
functions/removeObjectProperty.ts:9 functions/removeObjectProperty.ts:27
___ ___
@@ -279,4 +279,4 @@ This method doesn't support deep comparements.
#### Defined in #### Defined in
functions/replaceFromArrayByKeyValue.ts:12 functions/replaceFromArrayByKeyValue.ts:31

View File

@@ -24,7 +24,7 @@ along with RCZ. If not, see <https://www.gnu.org/licenses/>.
* @param chunkSize - size of a single chunk * @param chunkSize - size of a single chunk
* @returns array of chunks * @returns array of chunks
*/ */
export const SplitIntoChunks = <T>(array: T[], chunkSize: number): T[][] => { export const splitIntoChunks = <T>(array: T[], chunkSize: number): T[][] => {
return array.reduce<T[][]>((splitArray, item, index) => { return array.reduce<T[][]>((splitArray, item, index) => {
const chunkIndex = Math.floor(index / chunkSize); const chunkIndex = Math.floor(index / chunkSize);