aotrautils 0.0.1616 → 0.0.1618
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 +27 -22
- 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 (14/05/2025-
|
3
|
+
/*utils COMMONS library associated with aotra version : «1_29072022-2359 (14/05/2025-13:57:49)»*/
|
4
4
|
/*-----------------------------------------------------------------------------*/
|
5
5
|
|
6
6
|
|
@@ -4943,7 +4943,7 @@ AOTRAUTILS_LIB_IS_LOADED=true;
|
|
4943
4943
|
|
4944
4944
|
|
4945
4945
|
|
4946
|
-
/*utils CLIENT library associated with aotra version : «1_29072022-2359 (14/05/2025-
|
4946
|
+
/*utils CLIENT library associated with aotra version : «1_29072022-2359 (14/05/2025-13:57:49)»*/
|
4947
4947
|
/*-----------------------------------------------------------------------------*/
|
4948
4948
|
/* ## Utility global methods in a browser (htmljs) client environment.
|
4949
4949
|
*
|
@@ -5034,27 +5034,32 @@ window.arePathsSimilar=function(path1, path2, minLength=3){
|
|
5034
5034
|
if(!path1 && path2) return false;
|
5035
5035
|
if(path1 && !path2) return false;
|
5036
5036
|
|
5037
|
-
const
|
5038
|
-
const
|
5039
|
-
|
5040
|
-
|
5041
|
-
|
5042
|
-
|
5043
|
-
|
5044
|
-
|
5045
|
-
|
5046
|
-
|
5047
|
-
|
5048
|
-
|
5049
|
-
|
5050
|
-
|
5037
|
+
const segments1=getPathConcreteSegments(path1.trim().toLowerCase());
|
5038
|
+
const segments2=getPathConcreteSegments(path2.trim().toLowerCase());
|
5039
|
+
|
5040
|
+
return foreach(segments1, str1=>{
|
5041
|
+
return foreach(segments2, str2=>{
|
5042
|
+
if(!str1 && !str2) return "continue";
|
5043
|
+
if(!str1 && str2) return "continue";
|
5044
|
+
if(str1 && !str2) return "continue";
|
5045
|
+
|
5046
|
+
for(let i=0; i<=str1.length-minLength; i++) {
|
5047
|
+
for(let len=minLength; len<=str1.length-i; len++) {
|
5048
|
+
const sub=str1.substring(i, i+len);
|
5049
|
+
if(str2.includes(sub)) return true;
|
5050
|
+
}
|
5051
|
+
}
|
5052
|
+
|
5053
|
+
});
|
5054
|
+
});
|
5051
5055
|
}
|
5052
5056
|
|
5053
|
-
window.
|
5057
|
+
window.getPathConcreteSegments=function(urlPath){
|
5054
5058
|
const segments = urlPath
|
5055
5059
|
.split('/')
|
5056
|
-
.filter(s => s && !/^{.+}$/.test(s)); // ignore empty and
|
5057
|
-
return (0<segments.length ? segments[segments.length - 1] : null);
|
5060
|
+
.filter(s => s && !/^{.+}$/.test(s) && !/^[0-9]+$/.test(s)); // ignore empty chunks, placeholders chunks, and identifiers (number) chunks
|
5061
|
+
// OLD : return (0<segments.length ? segments[segments.length - 1] : null);
|
5062
|
+
return segments;
|
5058
5063
|
}
|
5059
5064
|
|
5060
5065
|
|
@@ -13545,7 +13550,7 @@ getAORTACClient=function(clientId=getUUID(), serverNodeOrigin="ws://127.0.0.1:40
|
|
13545
13550
|
|
13546
13551
|
|
13547
13552
|
|
13548
|
-
/*utils GEOMETRY library associated with aotra version : «1_29072022-2359 (14/05/2025-
|
13553
|
+
/*utils GEOMETRY library associated with aotra version : «1_29072022-2359 (14/05/2025-13:57:49)»*/
|
13549
13554
|
/*-----------------------------------------------------------------------------*/
|
13550
13555
|
|
13551
13556
|
|
@@ -14784,7 +14789,7 @@ function rayVsUnitSphereClosestPoint(p, r) {
|
|
14784
14789
|
// MUST REMAIN AT THE END OF THIS LIBRARY FILE !
|
14785
14790
|
|
14786
14791
|
AOTRAUTILS_GEOMETRY_LIB_IS_LOADED=true;
|
14787
|
-
/*utils AI library associated with aotra version : «1_29072022-2359 (14/05/2025-
|
14792
|
+
/*utils AI library associated with aotra version : «1_29072022-2359 (14/05/2025-13:57:49)»*/
|
14788
14793
|
/*-----------------------------------------------------------------------------*/
|
14789
14794
|
|
14790
14795
|
|
@@ -14930,7 +14935,7 @@ getOpenAIAPIClient=(modelName, apiURL, agentRole, defaultPrompt)=>{
|
|
14930
14935
|
|
14931
14936
|
|
14932
14937
|
|
14933
|
-
/*utils CONSOLE library associated with aotra version : «1_29072022-2359 (14/05/2025-
|
14938
|
+
/*utils CONSOLE library associated with aotra version : «1_29072022-2359 (14/05/2025-13:57:49)»*/
|
14934
14939
|
/*-----------------------------------------------------------------------------*/
|
14935
14940
|
|
14936
14941
|
|
aotrautils/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "aotrautils",
|
3
|
-
"version": "0.0.
|
3
|
+
"version": "0.0.1618",
|
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)",
|