aotrautils 0.0.555 → 0.0.557

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