aotrautils-srv 0.0.739 → 0.0.741
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 (
|
|
3
|
+
/*utils COMMONS library associated with aotra version : «1_29072022-2359 (10/11/2023-00:42:56)»*/
|
|
4
4
|
/*-----------------------------------------------------------------------------*/
|
|
5
5
|
|
|
6
6
|
|
|
@@ -1873,7 +1873,7 @@ window.nothing=function(nullable, insist=false){
|
|
|
1873
1873
|
|
|
1874
1874
|
// Actually an unsafe method to determine that variable «sizable» is not a
|
|
1875
1875
|
// classical (ie. non-associative) array...:
|
|
1876
|
-
|
|
1876
|
+
// NO : USE empty() instead: if(isArray(nullable)) return (nullable.length <= 0);
|
|
1877
1877
|
|
|
1878
1878
|
return false;
|
|
1879
1879
|
}
|
|
@@ -2862,7 +2862,7 @@ window.empty=function(sizable,/*OPTIONAL*/insist){
|
|
|
2862
2862
|
}
|
|
2863
2863
|
|
|
2864
2864
|
// Object «sizable» is not really sizable, at this point :
|
|
2865
|
-
return sizable.length <= 0;
|
|
2865
|
+
return (sizable.length <= 0);
|
|
2866
2866
|
}
|
|
2867
2867
|
|
|
2868
2868
|
window.clearArray=function(arr){
|
|
@@ -4086,9 +4086,15 @@ window.areEquivalentFlatMaps=function(o1,o2,UUID_ATTR_NAME=DEFAULT_UUID_ATTR_NAM
|
|
|
4086
4086
|
return areEquivalent;
|
|
4087
4087
|
}
|
|
4088
4088
|
|
|
4089
|
+
window.areEquivalentSimple=function(obj1Param,obj2Param, caseSensitive=true){
|
|
4090
|
+
const str1=stringify(obj1Param);
|
|
4091
|
+
const str2=stringify(obj2Param);
|
|
4092
|
+
if(!caseSensitive)
|
|
4093
|
+
return (str1.toLowerCase()==str2.toLowerCase());
|
|
4094
|
+
return (str1==str2);
|
|
4095
|
+
}
|
|
4089
4096
|
|
|
4090
|
-
|
|
4091
|
-
|
|
4097
|
+
// TODO : FIXME SEEMS TO NOT WORK ON SIMPLE OBJECTS !!!
|
|
4092
4098
|
window.areEquivalent=function(obj1Param,obj2Param,flattenBeforeCompute=false, UUID_ATTR_NAME=DEFAULT_UUID_ATTR_NAME,POINTER_TO_ATTR_NAME=DEFAULT_POINTER_TO_ATTR_NAME){
|
|
4093
4099
|
|
|
4094
4100
|
if((obj1Param!=null)!==(obj2Param!=null) || typeof(obj1Param)!==typeof(obj2Param)) return false;
|
|
@@ -5029,7 +5035,7 @@ window.parseJSON=function(strParam){
|
|
|
5029
5035
|
|
|
5030
5036
|
window.stringifyObject=function(objectToStringify){
|
|
5031
5037
|
|
|
5032
|
-
if(
|
|
5038
|
+
if(objectToStringify==null) return null;
|
|
5033
5039
|
|
|
5034
5040
|
if (JSON && JSON.stringify && typeof JSON.stringify !== "undefined" && typeof JSON.stringify === "function"){
|
|
5035
5041
|
return JSON.stringify(objectToStringify);
|
|
@@ -5161,7 +5167,7 @@ AOTRAUTILS_LIB_IS_LOADED=true;
|
|
|
5161
5167
|
|
|
5162
5168
|
|
|
5163
5169
|
|
|
5164
|
-
/*utils SERVER library associated with aotra version : «1_29072022-2359 (
|
|
5170
|
+
/*utils SERVER library associated with aotra version : «1_29072022-2359 (10/11/2023-00:42:56)»*/
|
|
5165
5171
|
/*-----------------------------------------------------------------------------*/
|
|
5166
5172
|
|
|
5167
5173
|
|
aotrautils-srv/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "aotrautils-srv",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.741",
|
|
4
4
|
"main": "aotrautils-srv.build.js",
|
|
5
5
|
"description": "A library for vanilla javascript utils (server-side) used in aotra javascript CMS",
|
|
6
6
|
"author": "Jeremie Ratomposon <info@alqemia.com> (https://alqemia.com)",
|