topkat-utils 1.3.6 → 1.3.8

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.
Files changed (32) hide show
  1. package/README.md +1 -0
  2. package/coverage/clover.xml +34 -21
  3. package/coverage/coverage-final.json +3 -3
  4. package/coverage/lcov-report/clean-stack-trace.ts.html +8 -17
  5. package/coverage/lcov-report/config.ts.html +1 -1
  6. package/coverage/lcov-report/error-utils.ts.html +1 -1
  7. package/coverage/lcov-report/index.html +30 -30
  8. package/coverage/lcov-report/is-empty.ts.html +1 -1
  9. package/coverage/lcov-report/is-nodejs.ts.html +1 -1
  10. package/coverage/lcov-report/is-object.ts.html +1 -1
  11. package/coverage/lcov-report/isset.ts.html +1 -1
  12. package/coverage/lcov-report/logger-utils.ts.html +22 -22
  13. package/coverage/lcov-report/loop-utils.ts.html +1 -1
  14. package/coverage/lcov-report/math-utils.ts.html +1 -1
  15. package/coverage/lcov-report/object-utils.ts.html +57 -9
  16. package/coverage/lcov-report/regexp-utils.ts.html +1 -1
  17. package/coverage/lcov-report/remove-circular-json-stringify.ts.html +1 -1
  18. package/coverage/lcov-report/string-utils.ts.html +1 -1
  19. package/coverage/lcov-report/timer-utils.ts.html +1 -1
  20. package/coverage/lcov-report/transaction-utils.ts.html +1 -1
  21. package/coverage/lcov.info +38 -30
  22. package/dist/src/clean-stack-trace.js +3 -5
  23. package/dist/src/clean-stack-trace.js.map +1 -1
  24. package/dist/src/logger-utils.js +2 -2
  25. package/dist/src/logger-utils.js.map +1 -1
  26. package/dist/src/object-utils.d.ts +5 -0
  27. package/dist/src/object-utils.js +14 -1
  28. package/dist/src/object-utils.js.map +1 -1
  29. package/package.json +1 -1
  30. package/src/clean-stack-trace.ts +2 -5
  31. package/src/logger-utils.ts +2 -2
  32. package/src/object-utils.ts +17 -1
package/README.md CHANGED
@@ -226,6 +226,7 @@ urlPathJoin('https://api.example.com//v1', '/users/', 'userId') // => 'https://a
226
226
  - `readOnly(obj)`: Lock all 1st level props of an object to read only (not rewritable / modifiable)
227
227
  - `reassignForbidden(obj)`: Fields of the object can be created BUT NOT reassignated
228
228
  - `readOnlyRecursive(obj)`: All fields and subFields of the object will be readOnly
229
+ - `createProxy(obj)`: replace `new Proxy(...)` from javascript with correct handling for JSON.stringify and a `__isProxy: true` helper prop
229
230
 
230
231
  ### Typescript equivalent of Js functions (Fix types)
231
232
  - `lowerCase(str)`: `lowerCase('HelloWorld' as const) // type: 'helloworld'` (Equivalent of type `LowerCase<MyString>`)
@@ -1,9 +1,9 @@
1
1
  <?xml version="1.0" encoding="UTF-8"?>
2
- <coverage generated="1742145424922" clover="3.2.0">
3
- <project timestamp="1742145424922" name="All files">
4
- <metrics statements="1920" coveredstatements="763" conditionals="55" coveredconditionals="30" methods="137" coveredmethods="13" elements="2112" coveredelements="806" complexity="0" loc="1920" ncloc="1920" packages="1" files="16" classes="16"/>
2
+ <coverage generated="1742334053008" clover="3.2.0">
3
+ <project timestamp="1742334053008" name="All files">
4
+ <metrics statements="1933" coveredstatements="773" conditionals="52" coveredconditionals="30" methods="136" coveredmethods="13" elements="2121" coveredelements="816" complexity="0" loc="1933" ncloc="1933" packages="1" files="16" classes="16"/>
5
5
  <file name="clean-stack-trace.ts" path="/Users/garcias/DEV/modules/topkat-utils/src/clean-stack-trace.ts">
6
- <metrics statements="41" coveredstatements="41" conditionals="9" coveredconditionals="6" methods="1" coveredmethods="1"/>
6
+ <metrics statements="38" coveredstatements="38" conditionals="7" coveredconditionals="6" methods="1" coveredmethods="1"/>
7
7
  <line num="1" count="2" type="stmt"/>
8
8
  <line num="2" count="2" type="cond" truecount="1" falsecount="0"/>
9
9
  <line num="3" count="2" type="cond" truecount="0" falsecount="1"/>
@@ -36,15 +36,12 @@
36
36
  <line num="30" count="2" type="stmt"/>
37
37
  <line num="31" count="2" type="cond" truecount="2" falsecount="0"/>
38
38
  <line num="32" count="2" type="cond" truecount="1" falsecount="0"/>
39
- <line num="33" count="8" type="cond" truecount="1" falsecount="0"/>
40
- <line num="34" count="6" type="cond" truecount="1" falsecount="0"/>
41
- <line num="35" count="6" type="cond" truecount="0" falsecount="1"/>
42
- <line num="36" count="6" type="cond" truecount="0" falsecount="1"/>
43
- <line num="37" count="6" type="stmt"/>
39
+ <line num="33" count="8" type="cond" truecount="2" falsecount="0"/>
40
+ <line num="34" count="6" type="stmt"/>
41
+ <line num="35" count="2" type="stmt"/>
42
+ <line num="36" count="2" type="stmt"/>
43
+ <line num="37" count="2" type="stmt"/>
44
44
  <line num="38" count="2" type="stmt"/>
45
- <line num="39" count="2" type="stmt"/>
46
- <line num="40" count="2" type="stmt"/>
47
- <line num="41" count="2" type="stmt"/>
48
45
  </file>
49
46
  <file name="config.ts" path="/Users/garcias/DEV/modules/topkat-utils/src/config.ts">
50
47
  <metrics statements="94" coveredstatements="68" conditionals="1" coveredconditionals="1" methods="2" coveredmethods="1"/>
@@ -397,7 +394,7 @@
397
394
  <line num="3" count="38" type="stmt"/>
398
395
  </file>
399
396
  <file name="logger-utils.ts" path="/Users/garcias/DEV/modules/topkat-utils/src/logger-utils.ts">
400
- <metrics statements="364" coveredstatements="153" conditionals="23" coveredconditionals="6" methods="42" coveredmethods="5"/>
397
+ <metrics statements="364" coveredstatements="150" conditionals="22" coveredconditionals="6" methods="40" coveredmethods="5"/>
401
398
  <line num="1" count="2" type="stmt"/>
402
399
  <line num="2" count="2" type="stmt"/>
403
400
  <line num="3" count="2" type="stmt"/>
@@ -705,12 +702,12 @@
705
702
  <line num="305" count="0" type="stmt"/>
706
703
  <line num="306" count="0" type="stmt"/>
707
704
  <line num="307" count="0" type="stmt"/>
708
- <line num="308" count="1" type="stmt"/>
705
+ <line num="308" count="2" type="stmt"/>
709
706
  <line num="309" count="2" type="stmt"/>
710
707
  <line num="310" count="2" type="stmt"/>
711
708
  <line num="311" count="2" type="stmt"/>
712
- <line num="312" count="1" type="cond" truecount="0" falsecount="1"/>
713
- <line num="313" count="0" type="cond" truecount="0" falsecount="1"/>
709
+ <line num="312" count="0" type="cond" truecount="0" falsecount="1"/>
710
+ <line num="313" count="0" type="stmt"/>
714
711
  <line num="314" count="0" type="stmt"/>
715
712
  <line num="315" count="0" type="stmt"/>
716
713
  <line num="316" count="0" type="stmt"/>
@@ -757,11 +754,11 @@
757
754
  <line num="357" count="0" type="stmt"/>
758
755
  <line num="358" count="0" type="stmt"/>
759
756
  <line num="359" count="0" type="stmt"/>
760
- <line num="360" count="1" type="stmt"/>
761
- <line num="361" count="1" type="stmt"/>
757
+ <line num="360" count="2" type="stmt"/>
758
+ <line num="361" count="2" type="stmt"/>
762
759
  <line num="362" count="0" type="stmt"/>
763
- <line num="363" count="1" type="stmt"/>
764
- <line num="364" count="1" type="stmt"/>
760
+ <line num="363" count="0" type="stmt"/>
761
+ <line num="364" count="0" type="stmt"/>
765
762
  </file>
766
763
  <file name="loop-utils.ts" path="/Users/garcias/DEV/modules/topkat-utils/src/loop-utils.ts">
767
764
  <metrics statements="163" coveredstatements="77" conditionals="0" coveredconditionals="0" methods="4" coveredmethods="0"/>
@@ -992,7 +989,7 @@
992
989
  <line num="59" count="0" type="stmt"/>
993
990
  </file>
994
991
  <file name="object-utils.ts" path="/Users/garcias/DEV/modules/topkat-utils/src/object-utils.ts">
995
- <metrics statements="444" coveredstatements="129" conditionals="0" coveredconditionals="0" methods="27" coveredmethods="0"/>
992
+ <metrics statements="460" coveredstatements="145" conditionals="0" coveredconditionals="0" methods="28" coveredmethods="0"/>
996
993
  <line num="1" count="2" type="stmt"/>
997
994
  <line num="2" count="2" type="stmt"/>
998
995
  <line num="3" count="2" type="stmt"/>
@@ -1437,6 +1434,22 @@
1437
1434
  <line num="442" count="2" type="stmt"/>
1438
1435
  <line num="443" count="2" type="stmt"/>
1439
1436
  <line num="444" count="2" type="stmt"/>
1437
+ <line num="445" count="2" type="stmt"/>
1438
+ <line num="446" count="2" type="stmt"/>
1439
+ <line num="447" count="2" type="stmt"/>
1440
+ <line num="448" count="2" type="stmt"/>
1441
+ <line num="449" count="1" type="stmt"/>
1442
+ <line num="450" count="1" type="stmt"/>
1443
+ <line num="451" count="1" type="stmt"/>
1444
+ <line num="452" count="1" type="stmt"/>
1445
+ <line num="453" count="1" type="stmt"/>
1446
+ <line num="454" count="1" type="stmt"/>
1447
+ <line num="455" count="1" type="stmt"/>
1448
+ <line num="456" count="1" type="stmt"/>
1449
+ <line num="457" count="1" type="stmt"/>
1450
+ <line num="458" count="1" type="stmt"/>
1451
+ <line num="459" count="1" type="stmt"/>
1452
+ <line num="460" count="1" type="stmt"/>
1440
1453
  </file>
1441
1454
  <file name="regexp-utils.ts" path="/Users/garcias/DEV/modules/topkat-utils/src/regexp-utils.ts">
1442
1455
  <metrics statements="52" coveredstatements="21" conditionals="0" coveredconditionals="0" methods="3" coveredmethods="0"/>