moneyfunx 1.1.5 → 1.1.6

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,13 +1,13 @@
1
- export interface AmortizationRecord {
1
+ export type AmortizationRecord = {
2
2
  period: number;
3
3
  principal: number;
4
4
  interest: number;
5
5
  principalRemaining: number;
6
- }
7
- export interface PaymentSummary {
6
+ };
7
+ export type PaymentSummary = {
8
8
  lifetimeInterest: number;
9
9
  lifetimePrincipal: number;
10
10
  amortizationSchedule: AmortizationRecord[];
11
- }
11
+ };
12
12
  export type LoansPaymentSummary = Record<string, PaymentSummary>;
13
13
  export type LoanPrincipals = Record<string, number>;
@@ -1,6 +1,6 @@
1
1
  <?xml version="1.0" encoding="UTF-8"?>
2
- <coverage generated="1738207621905" clover="3.2.0">
3
- <project timestamp="1738207621905" name="All files">
2
+ <coverage generated="1738425757810" clover="3.2.0">
3
+ <project timestamp="1738425757810" name="All files">
4
4
  <metrics statements="328" coveredstatements="328" conditionals="49" coveredconditionals="49" methods="18" coveredmethods="18" elements="395" coveredelements="395" complexity="0" loc="328" ncloc="328" packages="2" files="8" classes="8"/>
5
5
  <package name="src">
6
6
  <metrics statements="7" coveredstatements="7" conditionals="0" coveredconditionals="0" methods="0" coveredmethods="0"/>
@@ -116,7 +116,7 @@
116
116
  <div class='footer quiet pad2 space-top1 center small'>
117
117
  Code coverage generated by
118
118
  <a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
119
- at 2025-01-30T03:27:01.896Z
119
+ at 2025-02-01T16:02:37.796Z
120
120
  </div>
121
121
  <script src="prettify.js"></script>
122
122
  <script>
@@ -101,7 +101,7 @@
101
101
  <div class='footer quiet pad2 space-top1 center small'>
102
102
  Code coverage generated by
103
103
  <a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
104
- at 2025-01-30T03:27:01.896Z
104
+ at 2025-02-01T16:02:37.796Z
105
105
  </div>
106
106
  <script src="../prettify.js"></script>
107
107
  <script>
@@ -136,7 +136,7 @@ export { snowball, avalanche, sortLoans } from './lib/sorting';
136
136
  <div class='footer quiet pad2 space-top1 center small'>
137
137
  Code coverage generated by
138
138
  <a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
139
- at 2025-01-30T03:27:01.896Z
139
+ at 2025-02-01T16:02:37.796Z
140
140
  </div>
141
141
  <script src="../prettify.js"></script>
142
142
  <script>
@@ -70,7 +70,7 @@
70
70
  <div class='footer quiet pad2 space-top1 center small'>
71
71
  Code coverage generated by
72
72
  <a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
73
- at 2025-01-30T03:27:01.896Z
73
+ at 2025-02-01T16:02:37.796Z
74
74
  </div>
75
75
  <script src="../../prettify.js"></script>
76
76
  <script>
@@ -91,7 +91,7 @@
91
91
  <div class='footer quiet pad2 space-top1 center small'>
92
92
  Code coverage generated by
93
93
  <a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
94
- at 2025-01-30T03:27:01.896Z
94
+ at 2025-02-01T16:02:37.796Z
95
95
  </div>
96
96
  <script src="../../prettify.js"></script>
97
97
  <script>
@@ -355,7 +355,7 @@ export function numPaymentsToZero(
355
355
  <div class='footer quiet pad2 space-top1 center small'>
356
356
  Code coverage generated by
357
357
  <a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
358
- at 2025-01-30T03:27:01.896Z
358
+ at 2025-02-01T16:02:37.796Z
359
359
  </div>
360
360
  <script src="../../prettify.js"></script>
361
361
  <script>
@@ -191,7 +191,7 @@
191
191
  <div class='footer quiet pad2 space-top1 center small'>
192
192
  Code coverage generated by
193
193
  <a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
194
- at 2025-01-30T03:27:01.896Z
194
+ at 2025-02-01T16:02:37.796Z
195
195
  </div>
196
196
  <script src="../../prettify.js"></script>
197
197
  <script>
@@ -604,7 +604,7 @@ export class Loan implements ILoan {
604
604
  <div class='footer quiet pad2 space-top1 center small'>
605
605
  Code coverage generated by
606
606
  <a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
607
- at 2025-01-30T03:27:01.896Z
607
+ at 2025-02-01T16:02:37.796Z
608
608
  </div>
609
609
  <script src="../../prettify.js"></script>
610
610
  <script>
@@ -95,14 +95,14 @@
95
95
  <span class="cline-any cline-neutral">&nbsp;</span>
96
96
  <span class="cline-any cline-neutral">&nbsp;</span>
97
97
  <span class="cline-any cline-neutral">&nbsp;</span>
98
- <span class="cline-any cline-neutral">&nbsp;</span></td><td class="text"><pre class="prettyprint lang-js">export interface AmortizationRecord {
98
+ <span class="cline-any cline-neutral">&nbsp;</span></td><td class="text"><pre class="prettyprint lang-js">export type AmortizationRecord = {
99
99
  period: number;
100
100
  principal: number;
101
101
  interest: number;
102
102
  principalRemaining: number;
103
103
  }
104
104
  &nbsp;
105
- export interface PaymentSummary {
105
+ export type PaymentSummary = {
106
106
  lifetimeInterest: number;
107
107
  lifetimePrincipal: number;
108
108
  amortizationSchedule: AmortizationRecord[];
@@ -118,7 +118,7 @@ export type LoanPrincipals = Record&lt;string, number&gt;;
118
118
  <div class='footer quiet pad2 space-top1 center small'>
119
119
  Code coverage generated by
120
120
  <a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
121
- at 2025-01-30T03:27:01.896Z
121
+ at 2025-02-01T16:02:37.796Z
122
122
  </div>
123
123
  <script src="../../prettify.js"></script>
124
124
  <script>
@@ -784,7 +784,7 @@ export function payLoans(
784
784
  <div class='footer quiet pad2 space-top1 center small'>
785
785
  Code coverage generated by
786
786
  <a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
787
- at 2025-01-30T03:27:01.896Z
787
+ at 2025-02-01T16:02:37.796Z
788
788
  </div>
789
789
  <script src="../../prettify.js"></script>
790
790
  <script>
@@ -193,7 +193,7 @@ export function sortLoans(loans: ILoan[], sortFunction: sortFunction) {
193
193
  <div class='footer quiet pad2 space-top1 center small'>
194
194
  Code coverage generated by
195
195
  <a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
196
- at 2025-01-30T03:27:01.896Z
196
+ at 2025-02-01T16:02:37.796Z
197
197
  </div>
198
198
  <script src="../../prettify.js"></script>
199
199
  <script>
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "moneyfunx",
3
3
  "type": "module",
4
- "version": "1.1.5",
4
+ "version": "1.1.6",
5
5
  "description": "MoneyFunx is a small library of functions for financial computations, with a focus on personal finance",
6
6
  "main": "build/index.js",
7
7
  "types": "build/index.d.ts",
@@ -1,11 +1,11 @@
1
- export interface AmortizationRecord {
1
+ export type AmortizationRecord = {
2
2
  period: number;
3
3
  principal: number;
4
4
  interest: number;
5
5
  principalRemaining: number;
6
6
  }
7
7
 
8
- export interface PaymentSummary {
8
+ export type PaymentSummary = {
9
9
  lifetimeInterest: number;
10
10
  lifetimePrincipal: number;
11
11
  amortizationSchedule: AmortizationRecord[];