aotrautils 0.0.533 → 0.0.535

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 (05/07/2023-12:18:45)»*/
3
+ /*utils COMMONS library associated with aotra version : «1_29072022-2359 (05/07/2023-22:20:47)»*/
4
4
  /*-----------------------------------------------------------------------------*/
5
5
 
6
6
 
@@ -456,40 +456,50 @@ window.aotestMethods.getScenariiInTest=function(test){
456
456
  return results;
457
457
  };
458
458
 
459
- window.aotestMethods.iterateOverScenarii=function(allTests, doOnIteration, testsType=null, filter=null){
459
+
460
+
461
+ /*private*/window.aotestMethods.doForAllTestsByType=function(allTestsByType){
460
462
 
461
- if(testsType){
463
+ const loopResultI=foreach(allTestsByType,(testsByFunction,functionName)=>{
464
+ const loopResultJ=foreach(testsByFunction,(test,executionCoupleName)=>{
465
+
466
+ const scenarii=aotestMethods.getScenariiInTest(test)
467
+ const loopResultK=foreach(scenarii,(scenario, scenarioName)=>{
462
468
 
463
- foreach(allTests[testsType],(testsByFunction,functionName)=>{
464
- foreach(testsByFunction,(test,executionCoupleName)=>{
465
-
466
- const scenarii=aotestMethods.getScenariiInTest(test)
467
- foreach(scenarii,(scenario, scenarioName)=>{
468
-
469
- doOnIteration(scenario);
470
-
471
- },(scenario, scenarioName)=>filter && filter(scenario));
472
- });
473
- });
474
- }else{
469
+ if(doOnIteration) doOnIteration(scenario);
470
+ if(mustTerminate && mustTerminate(scenario))
471
+ return scenario;
472
+
473
+ },(scenario, scenarioName)=>filter && filter(scenario));
474
+
475
+ if(loopResultK)
476
+ return loopResultK;
477
+
478
+ });
479
+
480
+ if(loopResultJ)
481
+ return loopResultJ;
475
482
 
476
- foreach(allTests,(allTestsByType,t)=>{
483
+ });
484
+
485
+ return loopResultI;
486
+ }
477
487
 
478
- foreach(allTestsByType,(testsByFunction,functionName)=>{
479
- foreach(testsByFunction,(test,executionCoupleName)=>{
488
+ /*public*/window.aotestMethods.iterateOverScenarii=function(allTests, doOnIteration, testsType=null, filter=null, mustTerminate=null){
489
+
490
+ if(testsType){
480
491
 
481
- const scenarii=aotestMethods.getScenariiInTest(test)
482
- foreach(scenarii,(scenario, scenarioName)=>{
483
-
484
- doOnIteration(scenario);
485
-
486
- },(scenario, scenarioName)=>filter && filter(scenario));
487
- });
488
- });
489
-
492
+ const allTestsByType=allTests[testsType];
493
+ return doForAllTestsByType(allTestsByType);
494
+
495
+ }else{
496
+
497
+ return foreach(allTests,(allTestsByType,t)=>{
498
+ const loopResultH=doForAllTestsByType(allTestsByType);
499
+ if(loopResultH)
500
+ return loopResultH;
490
501
  });
491
502
 
492
-
493
503
  }
494
504
 
495
505
  };
@@ -4919,7 +4929,7 @@ AOTRAUTILS_LIB_IS_LOADED=true;
4919
4929
 
4920
4930
 
4921
4931
 
4922
- /*utils CLIENT library associated with aotra version : «1_29072022-2359 (05/07/2023-12:18:45)»*/
4932
+ /*utils CLIENT library associated with aotra version : «1_29072022-2359 (05/07/2023-22:20:47)»*/
4923
4933
  /*-----------------------------------------------------------------------------*/
4924
4934
  /* ## Utility global methods in a browser (htmljs) client environment.
4925
4935
  *
@@ -13186,7 +13196,7 @@ createOritaMicroClient=function(url, port, isNode=false, staticMicroClientIdPara
13186
13196
 
13187
13197
 
13188
13198
 
13189
- /*utils GEOMETRY library associated with aotra version : «1_29072022-2359 (05/07/2023-12:18:45)»*/
13199
+ /*utils GEOMETRY library associated with aotra version : «1_29072022-2359 (05/07/2023-22:20:47)»*/
13190
13200
  /*-----------------------------------------------------------------------------*/
13191
13201
 
13192
13202
 
@@ -14425,7 +14435,7 @@ function rayVsUnitSphereClosestPoint(p, r) {
14425
14435
  // MUST REMAIN AT THE END OF THIS LIBRARY FILE !
14426
14436
 
14427
14437
  AOTRAUTILS_GEOMETRY_LIB_IS_LOADED=true;
14428
- /*utils SERVER library associated with aotra version : «1_29072022-2359 (05/07/2023-12:18:45)»*/
14438
+ /*utils SERVER library associated with aotra version : «1_29072022-2359 (05/07/2023-22:20:47)»*/
14429
14439
  /*-----------------------------------------------------------------------------*/
14430
14440
 
14431
14441
 
aotrautils/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "aotrautils",
3
- "version": "0.0.533",
3
+ "version": "0.0.535",
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)",