aotrautils-srv 0.0.520 → 0.0.522
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 (04/07/2023-01:50:45)»*/
|
|
4
4
|
/*-----------------------------------------------------------------------------*/
|
|
5
5
|
|
|
6
6
|
|
|
@@ -2852,16 +2852,19 @@ window.containsOneOf=function(container, objectsToFind,/*OPTIONAL*/useRegexp=fal
|
|
|
2852
2852
|
});
|
|
2853
2853
|
};
|
|
2854
2854
|
|
|
2855
|
-
|
|
2855
|
+
|
|
2856
|
+
window.contains=function(container, objectToFind=null,/*OPTIONAL*/useRegexp=false,searchInKeysOnly=false){
|
|
2856
2857
|
if(nothing(container)){
|
|
2857
2858
|
// //TRACE
|
|
2858
2859
|
// console.log("WARN : Container is empty ! Cannot search for «"+objectToFind+"».");
|
|
2859
2860
|
return false;
|
|
2860
2861
|
}
|
|
2861
|
-
if(!isString(container) && objectToFind && isFunction(
|
|
2862
|
-
|
|
2863
|
-
if(
|
|
2862
|
+
if(!isString(container) && !objectToFind && window.contains.filterFunction && isFunction(window.contains.filterFunction)){
|
|
2863
|
+
const itemIsFound=!!foreach(container, (item, keyOrIndex)=>{
|
|
2864
|
+
if(window.contains.filterFunction(item, keyOrIndex)) return true;
|
|
2864
2865
|
});
|
|
2866
|
+
delete window.contains.filterFunction;
|
|
2867
|
+
return itemIsFound;
|
|
2865
2868
|
}else{
|
|
2866
2869
|
// Note : We also allow the search of null plain items in a container !
|
|
2867
2870
|
|
|
@@ -2893,6 +2896,11 @@ window.contains=function(container, objectToFind,/*OPTIONAL*/useRegexp=false,sea
|
|
|
2893
2896
|
return new RegExp(chunk, "gm").test(str);
|
|
2894
2897
|
}
|
|
2895
2898
|
};
|
|
2899
|
+
window.contains.filter=function(filterFunctionParam){
|
|
2900
|
+
window.contains.filterFunction=filterFunctionParam;
|
|
2901
|
+
return window.contains;
|
|
2902
|
+
}
|
|
2903
|
+
|
|
2896
2904
|
|
|
2897
2905
|
window.hasKey=function(container, keyToFind){
|
|
2898
2906
|
let result=foreach(container,(item,key)=>{
|
|
@@ -4866,7 +4874,7 @@ AOTRAUTILS_LIB_IS_LOADED=true;
|
|
|
4866
4874
|
|
|
4867
4875
|
|
|
4868
4876
|
|
|
4869
|
-
/*utils SERVER library associated with aotra version : «1_29072022-2359 (
|
|
4877
|
+
/*utils SERVER library associated with aotra version : «1_29072022-2359 (04/07/2023-01:50:45)»*/
|
|
4870
4878
|
/*-----------------------------------------------------------------------------*/
|
|
4871
4879
|
|
|
4872
4880
|
|
|
@@ -5294,6 +5302,7 @@ WebsocketImplementation={
|
|
|
5294
5302
|
};
|
|
5295
5303
|
|
|
5296
5304
|
|
|
5305
|
+
///!!!
|
|
5297
5306
|
nodeServerInstance.receptionEntryPoints.push(receptionEntryPoint);
|
|
5298
5307
|
|
|
5299
5308
|
// SPECIAL FOR THE SOCKETIO IMPLEMENTATION :
|
|
@@ -5629,6 +5638,7 @@ WebsocketImplementation={
|
|
|
5629
5638
|
};
|
|
5630
5639
|
|
|
5631
5640
|
|
|
5641
|
+
///!!!
|
|
5632
5642
|
nodeClientInstance.receptionEntryPoints.push(receptionEntryPoint);
|
|
5633
5643
|
|
|
5634
5644
|
// SPECIAL FOR THE SOCKETIO IMPLEMENTATION :
|
|
@@ -5826,8 +5836,9 @@ WebsocketImplementation={
|
|
|
5826
5836
|
}
|
|
5827
5837
|
};
|
|
5828
5838
|
|
|
5839
|
+
///!!!
|
|
5829
5840
|
// TODO : ADD TO ALL OTHER SUBSYSTEMS !
|
|
5830
|
-
if(!contains
|
|
5841
|
+
if(!contains.filter((l)=>(l.id && receptionEntryPoint.id && l.id===receptionEntryPoint.id))(browserInstance.receptionEntryPoints))
|
|
5831
5842
|
browserInstance.receptionEntryPoints.push(receptionEntryPoint);
|
|
5832
5843
|
|
|
5833
5844
|
// SPECIAL FOR THE SOCKETIO IMPLEMENTATION :
|
aotrautils-srv/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "aotrautils-srv",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.522",
|
|
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)",
|