@josecarlosrz/array-helper
Advanced tools
Comparing version 1.0.14 to 1.0.15
12
index.js
@@ -227,2 +227,14 @@ const shuffle = require('./shuffle'); | ||
static chunk(array, chunks = 2) | ||
{ | ||
const chunksArray = []; | ||
for (let i = 0; i < array.length; i += chunks) | ||
chunksArray.push(array.slice(i, i + chunks)); | ||
return chunksArray; | ||
} | ||
static unique(array) | ||
@@ -229,0 +241,0 @@ { |
{ | ||
"name": "@josecarlosrz/array-helper", | ||
"version": "1.0.14", | ||
"version": "1.0.15", | ||
"description": "Array helper to have async behavior and some util methods", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -18,2 +18,6 @@ const ArrayHelper = require('./'); | ||
const bigArray = [1, 2, 3, 4, 5, 6, 7, 8, 9]; | ||
console.log(ArrayHelper.chunk(bigArray)); | ||
let i = 1; | ||
@@ -20,0 +24,0 @@ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
8379
182