aotrautils 0.0.2018 → 0.0.2019

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/10/2026-23:01:49)»*/
3
+ /*utils COMMONS library associated with aotra version : «1_29072022-2359 (06/10/2026-00:37:28)»*/
4
4
  /*-----------------------------------------------------------------------------*/
5
5
 
6
6
 
@@ -5485,7 +5485,7 @@ window.AOTRAUTILS_LIB_IS_LOADED=true;
5485
5485
 
5486
5486
 
5487
5487
 
5488
- /*utils CLIENT library associated with aotra version : «1_29072022-2359 (05/10/2026-23:01:49)»*/
5488
+ /*utils CLIENT library associated with aotra version : «1_29072022-2359 (06/10/2026-00:37:28)»*/
5489
5489
  /*-----------------------------------------------------------------------------*/
5490
5490
  /* ## Utility global methods in a browser (htmljs) client environment.
5491
5491
  *
@@ -13000,7 +13000,7 @@ window.createOritaMicroClient=function(url, port, isNode=false, staticMicroClien
13000
13000
 
13001
13001
 
13002
13002
 
13003
- /*utils GEOMETRY library associated with aotra version : «1_29072022-2359 (05/10/2026-23:01:49)»*/
13003
+ /*utils GEOMETRY library associated with aotra version : «1_29072022-2359 (06/10/2026-00:37:28)»*/
13004
13004
  /*-----------------------------------------------------------------------------*/
13005
13005
 
13006
13006
 
@@ -14089,10 +14089,10 @@ function rayVsUnitSphereClosestPoint(p, r) {
14089
14089
  // MUST REMAIN AT THE END OF THIS LIBRARY FILE !
14090
14090
 
14091
14091
  window.AOTRAUTILS_GEOMETRY_LIB_IS_LOADED=true;
14092
- /*utils 3D library associated with aotra version : «1_29072022-2359 (05/10/2026-23:01:49)»*/
14092
+ /*utils 3D library associated with aotra version : «1_29072022-2359 (06/10/2026-00:37:28)»*/
14093
14093
  /*-----------------------------------------------------------------------------*/
14094
14094
 
14095
- /*utils AI library associated with aotra version : «1_29072022-2359 (05/10/2026-23:01:49)»*/
14095
+ /*utils AI library associated with aotra version : «1_29072022-2359 (06/10/2026-00:37:28)»*/
14096
14096
  /*-----------------------------------------------------------------------------*/
14097
14097
 
14098
14098
 
@@ -14356,7 +14356,7 @@ window.getLLMAPIClient=(modelName, apiURL, agentRole, defaultPrompt, llmProvider
14356
14356
 
14357
14357
 
14358
14358
 
14359
- /*utils CONSOLE library associated with aotra version : «1_29072022-2359 (05/10/2026-23:01:49)»*/
14359
+ /*utils CONSOLE library associated with aotra version : «1_29072022-2359 (06/10/2026-00:37:28)»*/
14360
14360
  /*-----------------------------------------------------------------------------*/
14361
14361
 
14362
14362
 
@@ -16407,12 +16407,24 @@ function toConvention(type="snake",str){
16407
16407
 
16408
16408
 
16409
16409
 
16410
- function capitalize(str){
16410
+ window.capitalize=function(str){
16411
16411
  if(nothing(str)) return "";
16412
16412
  return str.replace(/(?:^|\s)\S/m, firstChar => firstChar.toUpperCase()); // We replace only the first character.
16413
+ };
16414
+
16415
+
16416
+ window.unCamelCase=function(str, forceLowerCase=true){
16417
+ if(nothing(str)) return "";
16418
+ const result=str
16419
+ .replace(/([a-z0-9])([A-Z])/g, "$1 $2") // camelCase -> camel Case
16420
+ .replace(/([A-Z]+)([A-Z][a-z])/g, "$1 $2"); // HTTPResponse -> HTTP Response
16421
+ if(forceLowerCase)
16422
+ return result.toLowerCase();
16423
+ return result;
16413
16424
  }
16414
16425
 
16415
16426
 
16427
+
16416
16428
  /* ## Utility global methods in a javascript, console (nodejs) or vanilla javascript with no browser environment.
16417
16429
  *
16418
16430
  * This set of methods gathers utility generic-purpose methods usable in any JS project.
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "aotrautils",
3
- "version": "0.0.2018",
3
+ "version": "0.0.2019",
4
4
  "lockfileVersion": 3,
5
5
  "requires": true,
6
6
  "packages": {
7
7
  "": {
8
8
  "name": "aotrautils",
9
- "version": "0.0.2018",
9
+ "version": "0.0.2019",
10
10
  "license": "HGPL-1.0",
11
11
  "dependencies": {
12
12
  "atob": "^2.1.2",
aotrautils/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "aotrautils",
3
- "version": "0.0.2018",
3
+ "version": "0.0.2019",
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)",