aotrautils 0.0.545 → 0.0.546
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 +24 -4
- 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 (
|
|
3
|
+
/*utils COMMONS library associated with aotra version : «1_29072022-2359 (24/07/2023-22:29:59)»*/
|
|
4
4
|
/*-----------------------------------------------------------------------------*/
|
|
5
5
|
|
|
6
6
|
|
|
@@ -1843,6 +1843,26 @@ window.nothing=function(nullable, insist=false){
|
|
|
1843
1843
|
return false;
|
|
1844
1844
|
}
|
|
1845
1845
|
|
|
1846
|
+
window.getOrCreateAttribute=function(parentObject, attributesName, defaultValue={}){
|
|
1847
|
+
if(nothing(parentObject)) return null;
|
|
1848
|
+
if(nothing(attributesName)) return null;
|
|
1849
|
+
if(isString(attributesName)){
|
|
1850
|
+
const attributeName=attributesName;
|
|
1851
|
+
if(parentObject[attributeName]==null && defaultValue!=null){
|
|
1852
|
+
parentObject[attributeName]=defaultValue;
|
|
1853
|
+
}
|
|
1854
|
+
return parentObject[attributeName];
|
|
1855
|
+
}
|
|
1856
|
+
if(isArray(attributesName)){
|
|
1857
|
+
let item=parentObject;
|
|
1858
|
+
foreach(attributesName,(attributeName)=>{
|
|
1859
|
+
item=getOrCreateAttribute(item, attributeName, defaultValue);
|
|
1860
|
+
});
|
|
1861
|
+
return item;
|
|
1862
|
+
}
|
|
1863
|
+
return null;
|
|
1864
|
+
}
|
|
1865
|
+
|
|
1846
1866
|
window.nonull=function(value,defaultValue){
|
|
1847
1867
|
if(value===false) return value;
|
|
1848
1868
|
if(nothing(value)) return defaultValue;
|
|
@@ -4930,7 +4950,7 @@ AOTRAUTILS_LIB_IS_LOADED=true;
|
|
|
4930
4950
|
|
|
4931
4951
|
|
|
4932
4952
|
|
|
4933
|
-
/*utils CLIENT library associated with aotra version : «1_29072022-2359 (
|
|
4953
|
+
/*utils CLIENT library associated with aotra version : «1_29072022-2359 (24/07/2023-22:29:59)»*/
|
|
4934
4954
|
/*-----------------------------------------------------------------------------*/
|
|
4935
4955
|
/* ## Utility global methods in a browser (htmljs) client environment.
|
|
4936
4956
|
*
|
|
@@ -13197,7 +13217,7 @@ createOritaMicroClient=function(url, port, isNode=false, staticMicroClientIdPara
|
|
|
13197
13217
|
|
|
13198
13218
|
|
|
13199
13219
|
|
|
13200
|
-
/*utils GEOMETRY library associated with aotra version : «1_29072022-2359 (
|
|
13220
|
+
/*utils GEOMETRY library associated with aotra version : «1_29072022-2359 (24/07/2023-22:29:59)»*/
|
|
13201
13221
|
/*-----------------------------------------------------------------------------*/
|
|
13202
13222
|
|
|
13203
13223
|
|
|
@@ -14436,7 +14456,7 @@ function rayVsUnitSphereClosestPoint(p, r) {
|
|
|
14436
14456
|
// MUST REMAIN AT THE END OF THIS LIBRARY FILE !
|
|
14437
14457
|
|
|
14438
14458
|
AOTRAUTILS_GEOMETRY_LIB_IS_LOADED=true;
|
|
14439
|
-
/*utils SERVER library associated with aotra version : «1_29072022-2359 (
|
|
14459
|
+
/*utils SERVER library associated with aotra version : «1_29072022-2359 (24/07/2023-22:29:59)»*/
|
|
14440
14460
|
/*-----------------------------------------------------------------------------*/
|
|
14441
14461
|
|
|
14442
14462
|
|
aotrautils/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "aotrautils",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.546",
|
|
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)",
|