aotrautils 0.0.1668 → 0.0.1669
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.
- aotrautils/aotrautils.build.js +41 -6
- aotrautils/package.json +1 -1
aotrautils/aotrautils.build.js
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
|
2
2
|
|
3
|
-
/*utils COMMONS library associated with aotra version : «1_29072022-2359 (01/06/2025-
|
3
|
+
/*utils COMMONS library associated with aotra version : «1_29072022-2359 (01/06/2025-03:25:22)»*/
|
4
4
|
/*-----------------------------------------------------------------------------*/
|
5
5
|
|
6
6
|
|
@@ -3923,8 +3923,43 @@ var Timer=function(callback, delay){
|
|
3923
3923
|
|
3924
3924
|
|
3925
3925
|
|
3926
|
-
|
3927
3926
|
//=================================================================================
|
3927
|
+
// OBJECTS MANAGEMENT
|
3928
|
+
|
3929
|
+
|
3930
|
+
// (for arrays, it's index between dots !)
|
3931
|
+
window.getByDottedPath=(obj, path)=>{
|
3932
|
+
if(!contains(path,".")){
|
3933
|
+
return obj[path];
|
3934
|
+
}
|
3935
|
+
let result=obj;
|
3936
|
+
const parts=path.split(".");
|
3937
|
+
for(const part of parts) {
|
3938
|
+
if(result==null)
|
3939
|
+
return undefined;
|
3940
|
+
result=result[part];
|
3941
|
+
}
|
3942
|
+
return result;
|
3943
|
+
};
|
3944
|
+
|
3945
|
+
// (for arrays, it's index between dots !)
|
3946
|
+
window.setByDottedPath=(obj, path, value)=>{
|
3947
|
+
if(!contains(path,".")){
|
3948
|
+
obj[path]=vale;
|
3949
|
+
}
|
3950
|
+
let currentObject=obj;
|
3951
|
+
const parts=path.split(".");
|
3952
|
+
for(let i=0; i<parts.length-1; i++) {
|
3953
|
+
const part=parts[i];
|
3954
|
+
if(!(part in currentObject)) {
|
3955
|
+
const nextIsIndex=(!isNaN(parts[i + 1]));
|
3956
|
+
currentObject[part]=(nextIsIndex ? [] : {});
|
3957
|
+
}
|
3958
|
+
currentObject=currentObject[part];
|
3959
|
+
}
|
3960
|
+
currentObject[parts[parts.length - 1]]=value;
|
3961
|
+
};
|
3962
|
+
|
3928
3963
|
|
3929
3964
|
|
3930
3965
|
getUUID=function(mode=null){
|
@@ -4952,7 +4987,7 @@ AOTRAUTILS_LIB_IS_LOADED=true;
|
|
4952
4987
|
|
4953
4988
|
|
4954
4989
|
|
4955
|
-
/*utils CLIENT library associated with aotra version : «1_29072022-2359 (01/06/2025-
|
4990
|
+
/*utils CLIENT library associated with aotra version : «1_29072022-2359 (01/06/2025-03:25:22)»*/
|
4956
4991
|
/*-----------------------------------------------------------------------------*/
|
4957
4992
|
/* ## Utility global methods in a browser (htmljs) client environment.
|
4958
4993
|
*
|
@@ -13555,7 +13590,7 @@ getAORTACClient=function(clientId=getUUID(), serverNodeOrigin="ws://127.0.0.1:40
|
|
13555
13590
|
|
13556
13591
|
|
13557
13592
|
|
13558
|
-
/*utils GEOMETRY library associated with aotra version : «1_29072022-2359 (01/06/2025-
|
13593
|
+
/*utils GEOMETRY library associated with aotra version : «1_29072022-2359 (01/06/2025-03:25:22)»*/
|
13559
13594
|
/*-----------------------------------------------------------------------------*/
|
13560
13595
|
|
13561
13596
|
|
@@ -14794,7 +14829,7 @@ function rayVsUnitSphereClosestPoint(p, r) {
|
|
14794
14829
|
// MUST REMAIN AT THE END OF THIS LIBRARY FILE !
|
14795
14830
|
|
14796
14831
|
AOTRAUTILS_GEOMETRY_LIB_IS_LOADED=true;
|
14797
|
-
/*utils AI library associated with aotra version : «1_29072022-2359 (01/06/2025-
|
14832
|
+
/*utils AI library associated with aotra version : «1_29072022-2359 (01/06/2025-03:25:22)»*/
|
14798
14833
|
/*-----------------------------------------------------------------------------*/
|
14799
14834
|
|
14800
14835
|
|
@@ -14940,7 +14975,7 @@ getOpenAIAPIClient=(modelName, apiURL, agentRole, defaultPrompt)=>{
|
|
14940
14975
|
|
14941
14976
|
|
14942
14977
|
|
14943
|
-
/*utils CONSOLE library associated with aotra version : «1_29072022-2359 (01/06/2025-
|
14978
|
+
/*utils CONSOLE library associated with aotra version : «1_29072022-2359 (01/06/2025-03:25:22)»*/
|
14944
14979
|
/*-----------------------------------------------------------------------------*/
|
14945
14980
|
|
14946
14981
|
|
aotrautils/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "aotrautils",
|
3
|
-
"version": "0.0.
|
3
|
+
"version": "0.0.1669",
|
4
4
|
"main": "aotrautils.build.js",
|
5
5
|
"description": "A library for vanilla javascript utils (client-side) used in aotra javascript CMS",
|
6
6
|
"author": "Jeremie Ratomposon <info@alqemia.com> (https://alqemia.com)",
|