aotrautils 0.0.1019 → 0.0.1021
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 +32 -27
- 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 (23/06/2024-01:16:13)»*/
|
4
4
|
/*-----------------------------------------------------------------------------*/
|
5
5
|
|
6
6
|
|
@@ -2914,31 +2914,36 @@ Math.getRandomInArray=function(arrayOfValues,removeFromArray=false){
|
|
2914
2914
|
}
|
2915
2915
|
|
2916
2916
|
// This function is for arrays, like Array or Objects used as associative arrays you want to test as holding elements :
|
2917
|
-
window.empty=function(sizable,/*OPTIONAL*/insist){
|
2917
|
+
window.empty=function(sizable,/*OPTIONAL*/insist=false){
|
2918
2918
|
|
2919
2919
|
if(nothing(sizable, insist))
|
2920
2920
|
return true;
|
2921
|
-
|
2922
|
-
|
2923
|
-
|
2924
|
-
|
2925
|
-
|
2926
|
-
|
2927
|
-
|
2928
|
-
|
2929
|
-
if(
|
2930
|
-
|
2931
|
-
|
2932
|
-
|
2933
|
-
|
2934
|
-
|
2935
|
-
|
2936
|
-
|
2937
|
-
|
2938
|
-
|
2939
|
-
|
2940
|
-
|
2941
|
-
|
2921
|
+
|
2922
|
+
// NEW :
|
2923
|
+
const result=(countKeys(sizable)==0);
|
2924
|
+
return result;
|
2925
|
+
|
2926
|
+
// OLD :
|
2927
|
+
// if(typeof sizable === "object"){ // for classical and associative arrays
|
2928
|
+
//
|
2929
|
+
// if(sizable instanceof Array)
|
2930
|
+
// return sizable.length <= 0;
|
2931
|
+
//
|
2932
|
+
// // Actually an unsafe method to determine that variable «sizable» is not a
|
2933
|
+
// // classical (ie. non-associative) array...:
|
2934
|
+
// if(!isArray(sizable)){
|
2935
|
+
// for (key in sizable){
|
2936
|
+
// if(!sizable.hasOwnProperty(key))
|
2937
|
+
// continue;
|
2938
|
+
// return false;
|
2939
|
+
// }
|
2940
|
+
// return true;
|
2941
|
+
// }
|
2942
|
+
//
|
2943
|
+
// }
|
2944
|
+
//
|
2945
|
+
// // Object «sizable» is not really sizable, at this point :
|
2946
|
+
// return (sizable.length <= 0);
|
2942
2947
|
}
|
2943
2948
|
|
2944
2949
|
window.clearArray=function(arr){
|
@@ -3126,7 +3131,7 @@ window.hasKey=function(container, keyToFind){
|
|
3126
3131
|
};
|
3127
3132
|
|
3128
3133
|
|
3129
|
-
window.countKeys=function(container,keysToExclude){
|
3134
|
+
window.countKeys=function(container, keysToExclude){
|
3130
3135
|
|
3131
3136
|
// We get all keys :
|
3132
3137
|
let keys=Object.keys(container);
|
@@ -5354,7 +5359,7 @@ AOTRAUTILS_LIB_IS_LOADED=true;
|
|
5354
5359
|
|
5355
5360
|
|
5356
5361
|
|
5357
|
-
/*utils CLIENT library associated with aotra version : «1_29072022-2359 (
|
5362
|
+
/*utils CLIENT library associated with aotra version : «1_29072022-2359 (23/06/2024-01:16:13)»*/
|
5358
5363
|
/*-----------------------------------------------------------------------------*/
|
5359
5364
|
/* ## Utility global methods in a browser (htmljs) client environment.
|
5360
5365
|
*
|
@@ -13565,7 +13570,7 @@ createOritaMicroClient=function(url, port, isNode=false, staticMicroClientIdPara
|
|
13565
13570
|
|
13566
13571
|
|
13567
13572
|
|
13568
|
-
/*utils GEOMETRY library associated with aotra version : «1_29072022-2359 (
|
13573
|
+
/*utils GEOMETRY library associated with aotra version : «1_29072022-2359 (23/06/2024-01:16:13)»*/
|
13569
13574
|
/*-----------------------------------------------------------------------------*/
|
13570
13575
|
|
13571
13576
|
|
@@ -14804,7 +14809,7 @@ function rayVsUnitSphereClosestPoint(p, r) {
|
|
14804
14809
|
// MUST REMAIN AT THE END OF THIS LIBRARY FILE !
|
14805
14810
|
|
14806
14811
|
AOTRAUTILS_GEOMETRY_LIB_IS_LOADED=true;
|
14807
|
-
/*utils SERVER library associated with aotra version : «1_29072022-2359 (
|
14812
|
+
/*utils SERVER library associated with aotra version : «1_29072022-2359 (23/06/2024-01:16:13)»*/
|
14808
14813
|
/*-----------------------------------------------------------------------------*/
|
14809
14814
|
|
14810
14815
|
|
aotrautils/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "aotrautils",
|
3
|
-
"version": "0.0.
|
3
|
+
"version": "0.0.1021",
|
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)",
|