aotrautils 0.0.554 → 0.0.556

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 (26/07/2023-12:02:22)»*/
3
+ /*utils COMMONS library associated with aotra version : «1_29072022-2359 (26/07/2023-23:27:34)»*/
4
4
  /*-----------------------------------------------------------------------------*/
5
5
 
6
6
 
@@ -1855,21 +1855,15 @@ window.getOrCreateAttribute=function(parentObject, attributeNameOrAttributesName
1855
1855
  return parentObject[attributeName];
1856
1856
  }
1857
1857
  if(isArray(attributeNameOrAttributesName)){
1858
- // let item=parentObject;
1859
- // foreach(attributeNameOrAttributesName,(attributeName)=>{
1860
- // const child=getOrCreateAttribute(item, attributeName, defaultValue);
1861
- // });
1862
- const item=getOrCreateAttribute(parentObject, attributeNameOrAttributesName.slice(1), defaultValue);
1863
-
1864
- //DBG
1865
- lognow("item:",item);
1866
1858
 
1867
- const result=getOrCreateAttribute(item, attributeNameOrAttributesName[0], defaultValue);
1868
-
1869
- //DBG
1870
- lognow("result:",result);
1859
+ const attributeName=attributeNameOrAttributesName[0];
1860
+ if(parentObject[attributeName]){
1861
+ parentObject[attributeName]=getOrCreateAttribute(parentObject[attributeName], attributeNameOrAttributesName.slice(1), defaultValue);
1862
+ }else{
1863
+ parentObject[attributeName]=getOrCreateAttribute({}, attributeNameOrAttributesName.slice(1), defaultValue);
1864
+ }
1865
+ return parentObject;
1871
1866
 
1872
- return result;
1873
1867
  }
1874
1868
  return parentObject;
1875
1869
  }
@@ -4961,7 +4955,7 @@ AOTRAUTILS_LIB_IS_LOADED=true;
4961
4955
 
4962
4956
 
4963
4957
 
4964
- /*utils CLIENT library associated with aotra version : «1_29072022-2359 (26/07/2023-12:02:22)»*/
4958
+ /*utils CLIENT library associated with aotra version : «1_29072022-2359 (26/07/2023-23:27:34)»*/
4965
4959
  /*-----------------------------------------------------------------------------*/
4966
4960
  /* ## Utility global methods in a browser (htmljs) client environment.
4967
4961
  *
@@ -13228,7 +13222,7 @@ createOritaMicroClient=function(url, port, isNode=false, staticMicroClientIdPara
13228
13222
 
13229
13223
 
13230
13224
 
13231
- /*utils GEOMETRY library associated with aotra version : «1_29072022-2359 (26/07/2023-12:02:22)»*/
13225
+ /*utils GEOMETRY library associated with aotra version : «1_29072022-2359 (26/07/2023-23:27:34)»*/
13232
13226
  /*-----------------------------------------------------------------------------*/
13233
13227
 
13234
13228
 
@@ -14467,7 +14461,7 @@ function rayVsUnitSphereClosestPoint(p, r) {
14467
14461
  // MUST REMAIN AT THE END OF THIS LIBRARY FILE !
14468
14462
 
14469
14463
  AOTRAUTILS_GEOMETRY_LIB_IS_LOADED=true;
14470
- /*utils SERVER library associated with aotra version : «1_29072022-2359 (26/07/2023-12:02:22)»*/
14464
+ /*utils SERVER library associated with aotra version : «1_29072022-2359 (26/07/2023-23:27:34)»*/
14471
14465
  /*-----------------------------------------------------------------------------*/
14472
14466
 
14473
14467
 
aotrautils/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "aotrautils",
3
- "version": "0.0.554",
3
+ "version": "0.0.556",
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)",