karl-common-util
Advanced tools
Comparing version 1.4.5 to 1.4.6
@@ -63,2 +63,8 @@ "use strict"; | ||
break; | ||
case "max": | ||
findEle[id] = Math.max(findEle[id], vJson[id]); | ||
break; | ||
case "min": | ||
findEle[id] = Math.min(findEle[id], vJson[id]); | ||
break; | ||
} | ||
@@ -84,2 +90,15 @@ }); | ||
}; | ||
} | ||
if (!Array.prototype.toNestArray) { | ||
Array.prototype.toNestArray = function (num) { | ||
var data = this.concat(); | ||
var newData = []; | ||
for (var i = 0; i < Math.ceil((data.length + 1) / num); i++) { | ||
var start = i * num; | ||
var end = (i + 1) * num; | ||
newData.push(data.slice(start, end)); | ||
} | ||
return newData; | ||
}; | ||
} |
{ | ||
"name": "karl-common-util", | ||
"version": "1.4.5", | ||
"version": "1.4.6", | ||
"description": "karl common lib for client and server", | ||
@@ -5,0 +5,0 @@ "main": "dist/index.js", |
@@ -52,2 +52,8 @@ if (!Array.prototype.aggregate) { | ||
break | ||
case "max": | ||
findEle[id] = Math.max(findEle[id], vJson[id]) | ||
break | ||
case "min": | ||
findEle[id] = Math.min(findEle[id], vJson[id]) | ||
break | ||
} | ||
@@ -69,2 +75,15 @@ }) | ||
} | ||
} | ||
if (!Array.prototype.toNestArray) { | ||
Array.prototype.toNestArray = function (num) { | ||
let data = this.concat() | ||
let newData = [] | ||
for (let i = 0; i < Math.ceil((data.length + 1) / num); i++) { | ||
let start = i * num | ||
let end = (i + 1) * num | ||
newData.push(data.slice(start, end)) | ||
} | ||
return newData | ||
} | ||
} |
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
60945
1478