aotrautils-srv 0.0.1265 → 0.0.1266
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,6 +1,6 @@
|
|
1
1
|
|
2
2
|
|
3
|
-
/*utils COMMONS library associated with aotra version : «1_29072022-2359 (02/04/2025-21:
|
3
|
+
/*utils COMMONS library associated with aotra version : «1_29072022-2359 (02/04/2025-21:51:56)»*/
|
4
4
|
/*-----------------------------------------------------------------------------*/
|
5
5
|
|
6
6
|
|
@@ -2952,8 +2952,11 @@ Math.getRandomsInArray=function(arrayOfValues, numberOfItemsToGet=1){
|
|
2952
2952
|
|
2953
2953
|
if(numberOfItemsToGet<0 || empty(arrayOfValues)) return [];
|
2954
2954
|
const size=getArraySize(arrayOfValues);
|
2955
|
+
|
2955
2956
|
// We skip a costly random calculation if we have only one element in array :
|
2956
2957
|
if(size===1) return [valueAt(arrayOfValues,0)];
|
2958
|
+
// We skip a costly random calculation if we have to return all elements in array :
|
2959
|
+
if(size<=numberOfItemsToGet) return arrayOfValues;
|
2957
2960
|
|
2958
2961
|
const indexesPool=[];
|
2959
2962
|
for(let i=0;i<size;i++) indexesPool.push(i);
|
@@ -4894,7 +4897,7 @@ AOTRAUTILS_LIB_IS_LOADED=true;
|
|
4894
4897
|
|
4895
4898
|
|
4896
4899
|
|
4897
|
-
/*utils AI library associated with aotra version : «1_29072022-2359 (02/04/2025-21:
|
4900
|
+
/*utils AI library associated with aotra version : «1_29072022-2359 (02/04/2025-21:51:56)»*/
|
4898
4901
|
/*-----------------------------------------------------------------------------*/
|
4899
4902
|
|
4900
4903
|
|
@@ -5038,7 +5041,7 @@ getOpenAIAPIClient=(modelName, apiURL, agentRole, defaultPrompt)=>{
|
|
5038
5041
|
|
5039
5042
|
|
5040
5043
|
|
5041
|
-
/*utils SERVER library associated with aotra version : «1_29072022-2359 (02/04/2025-21:
|
5044
|
+
/*utils SERVER library associated with aotra version : «1_29072022-2359 (02/04/2025-21:51:56)»*/
|
5042
5045
|
/*-----------------------------------------------------------------------------*/
|
5043
5046
|
|
5044
5047
|
|
aotrautils-srv/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "aotrautils-srv",
|
3
|
-
"version": "0.0.
|
3
|
+
"version": "0.0.1266",
|
4
4
|
"main": "aotrautils-srv.build.js",
|
5
5
|
"description": "A library for vanilla javascript utils (server-side) used in aotra javascript CMS",
|
6
6
|
"author": "Jeremie Ratomposon <info@alqemia.com> (https://alqemia.com)",
|