moneyfunx 3.0.2 → 3.0.4
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.
- package/build/src/index.d.ts +13 -12
- package/build/src/index.d.ts.map +1 -1
- package/build/src/index.js +10 -12
- package/build/src/lib/debt/loan.d.ts +1 -1
- package/build/src/lib/debt/loan.d.ts.map +1 -1
- package/build/src/lib/debt/loan.js +2 -2
- package/build/src/lib/debt/payments.d.ts +2 -2
- package/build/src/lib/debt/payments.d.ts.map +1 -1
- package/build/src/lib/debt/payments.js +1 -1
- package/build/src/lib/investment/contributions.d.ts +2 -2
- package/build/src/lib/investment/contributions.d.ts.map +1 -1
- package/build/src/lib/investment/instrument.d.ts +1 -1
- package/build/src/lib/investment/instrument.d.ts.map +1 -1
- package/build/src/lib/investment/instrument.js +2 -2
- package/build/src/lib/investment/strategies.d.ts +2 -2
- package/build/src/lib/investment/strategies.d.ts.map +1 -1
- package/build/src/lib/investment/strategies.js +2 -2
- package/build/src/lib/investment/withdrawals.d.ts +2 -2
- package/build/src/lib/investment/withdrawals.d.ts.map +1 -1
- package/build/src/lib/investment/withdrawals.js +2 -2
- package/build/tests/index.test.js +1 -1
- package/package.json +1 -1
package/build/src/index.d.ts
CHANGED
|
@@ -2,16 +2,17 @@
|
|
|
2
2
|
* MoneyFunx
|
|
3
3
|
* * mek it funx up
|
|
4
4
|
*/
|
|
5
|
-
export { MAX_DURATION_YEARS, TOTALS, } from '
|
|
6
|
-
export { ILoan, Loan } from '
|
|
7
|
-
export { determineExtraPayment, amortizePayments, payLoans, } from '
|
|
8
|
-
export { PaymentRecord, LoansPaymentSchedule, LoanPrincipals, PaymentSchedule, } from '
|
|
9
|
-
export { NegativeContributionError, PaymentTooLowError, NegativeWithdrawalError } from '
|
|
10
|
-
export { amortizeContributions, contributeInstruments, determineExtraContribution, } from '
|
|
11
|
-
export { ContributionRecord, ContributionSchedule, InstrumentsContributionSchedule, } from '
|
|
12
|
-
export { IInstrument, Instrument } from '
|
|
13
|
-
export { calculateAmortizedWithdrawal, drawdownInstruments, } from '
|
|
14
|
-
export { WithdrawalRecord, WithdrawalSchedule, InstrumentsWithdrawalSchedule, } from '
|
|
15
|
-
export {
|
|
16
|
-
export {
|
|
5
|
+
export { MAX_DURATION_YEARS, TOTALS, } from './lib/constants';
|
|
6
|
+
export { ILoan, Loan } from './lib/debt/loan';
|
|
7
|
+
export { determineExtraPayment, amortizePayments, payLoans, } from './lib/debt/payments';
|
|
8
|
+
export { PaymentRecord, LoansPaymentSchedule, LoanPrincipals, PaymentSchedule, } from './lib/debt/paymentTypes';
|
|
9
|
+
export { NegativeContributionError, PaymentTooLowError, NegativeWithdrawalError } from './lib/errors';
|
|
10
|
+
export { amortizeContributions, contributeInstruments, determineExtraContribution, } from './lib/investment/contributions';
|
|
11
|
+
export { ContributionRecord, ContributionSchedule, InstrumentsContributionSchedule, } from './lib/investment/contributionTypes';
|
|
12
|
+
export { IInstrument, Instrument } from './lib/investment/instrument';
|
|
13
|
+
export { calculateAmortizedWithdrawal, drawdownInstruments, } from './lib/investment/withdrawals';
|
|
14
|
+
export { WithdrawalRecord, WithdrawalSchedule, InstrumentsWithdrawalSchedule, } from './lib/investment/withdrawalTypes';
|
|
15
|
+
export { performWaterfallDrawdown, } from './lib/investment/strategies';
|
|
16
|
+
export { calculatePeriodicAmount, calculateBalanceRemaining, calculatePeriodsToZero, calculateInterestOverPeriods, } from './lib/shared/primitives';
|
|
17
|
+
export { HasRateAndBalance, snowball, avalanche, sortWith } from './lib/shared/sorting';
|
|
17
18
|
//# sourceMappingURL=index.d.ts.map
|
package/build/src/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EACL,kBAAkB,EAClB,MAAM,GACP,MAAM,iBAAiB,CAAC;AAEzB,OAAO,EAAE,KAAK,EAAE,IAAI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AAoB,EACpB,+BAA+B,GAChC,MAAM,oCAAoC,CAAC;AAE5C,OAAO,EAAE,WAAW,EAAE,UAAU,EAAE,MAAM,6BAA6B,CAAC;AAEtE,OAAO,EACL,4BAA4B,EAC5B,mBAAmB,GACpB,MAAM,8BAA8B,CAAC;AAEtC,OAAO,EACL,gBAAgB,EAChB,kBAAkB,EAClB,6BAA6B,GAC9B,MAAM,kCAAkC,CAAC;AAE1C,OAAO,EACL,wBAAwB,GACzB,MAAM,6BAA6B,CAAC;AAErC,OAAO,EACL,uBAAuB,EACvB,yBAAyB,EACzB,sBAAsB,EACtB,4BAA4B,GAC7B,MAAM,yBAAyB,CAAC;AAEjC,OAAO,EAAE,iBAAiB,EAAE,QAAQ,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAC"}
|
package/build/src/index.js
CHANGED
|
@@ -2,15 +2,13 @@
|
|
|
2
2
|
* MoneyFunx
|
|
3
3
|
* * mek it funx up
|
|
4
4
|
*/
|
|
5
|
-
export { MAX_DURATION_YEARS, TOTALS, } from '
|
|
6
|
-
export { Loan } from '
|
|
7
|
-
export { determineExtraPayment, amortizePayments, payLoans, } from '
|
|
8
|
-
export { NegativeContributionError, PaymentTooLowError, NegativeWithdrawalError } from '
|
|
9
|
-
export { amortizeContributions, contributeInstruments, determineExtraContribution, } from '
|
|
10
|
-
export { Instrument } from '
|
|
11
|
-
export { calculateAmortizedWithdrawal, drawdownInstruments, } from '
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
export { calculatePeriodicAmount, calculateBalanceRemaining, calculatePeriodsToZero, calculateInterestOverPeriods, } from '@/lib/shared/primitives';
|
|
16
|
-
export { snowball, avalanche, sortWith } from '@/lib/shared/sorting';
|
|
5
|
+
export { MAX_DURATION_YEARS, TOTALS, } from './lib/constants';
|
|
6
|
+
export { Loan } from './lib/debt/loan';
|
|
7
|
+
export { determineExtraPayment, amortizePayments, payLoans, } from './lib/debt/payments';
|
|
8
|
+
export { NegativeContributionError, PaymentTooLowError, NegativeWithdrawalError } from './lib/errors';
|
|
9
|
+
export { amortizeContributions, contributeInstruments, determineExtraContribution, } from './lib/investment/contributions';
|
|
10
|
+
export { Instrument } from './lib/investment/instrument';
|
|
11
|
+
export { calculateAmortizedWithdrawal, drawdownInstruments, } from './lib/investment/withdrawals';
|
|
12
|
+
export { performWaterfallDrawdown, } from './lib/investment/strategies';
|
|
13
|
+
export { calculatePeriodicAmount, calculateBalanceRemaining, calculatePeriodsToZero, calculateInterestOverPeriods, } from './lib/shared/primitives';
|
|
14
|
+
export { snowball, avalanche, sortWith } from './lib/shared/sorting';
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* Represents a financial loan and provides methods for amortization and
|
|
3
3
|
* interest calculations.
|
|
4
4
|
*/
|
|
5
|
-
import { HasRateAndBalance } from '
|
|
5
|
+
import { HasRateAndBalance } from '../shared/sorting';
|
|
6
6
|
export interface ILoan extends HasRateAndBalance {
|
|
7
7
|
id: string;
|
|
8
8
|
name: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"loan.d.ts","sourceRoot":"","sources":["../../../../src/lib/debt/loan.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAIH,OAAO,EAAE,iBAAiB,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"loan.d.ts","sourceRoot":"","sources":["../../../../src/lib/debt/loan.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAIH,OAAO,EAAE,iBAAiB,EAAE,MAAM,mBAAmB,CAAC;AAEtD,MAAM,WAAW,KAAM,SAAQ,iBAAiB;IAC9C,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,SAAS,EAAE,MAAM,CAAC;IAClB,UAAU,EAAE,MAAM,CAAC;IACnB,cAAc,EAAE,MAAM,CAAC;IACvB,WAAW,EAAE,MAAM,CAAC;IACpB,YAAY,EAAE,MAAM,CAAC;IACrB,OAAO,EAAE,MAAM,CAAC;IACh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
3
|
* interest calculations.
|
|
4
4
|
*/
|
|
5
|
-
import * as errors from '
|
|
6
|
-
import * as primitives from '
|
|
5
|
+
import * as errors from '../errors';
|
|
6
|
+
import * as primitives from '../shared/primitives';
|
|
7
7
|
export class Loan {
|
|
8
8
|
/**
|
|
9
9
|
* @constructor
|
|
@@ -3,8 +3,8 @@
|
|
|
3
3
|
* This file contains functions for computing detailed information on paying loans
|
|
4
4
|
*
|
|
5
5
|
*/
|
|
6
|
-
import type { ILoan, Loan } from '
|
|
7
|
-
import type { PaymentRecord, LoansPaymentSchedule } from '
|
|
6
|
+
import type { ILoan, Loan } from '../debt/loan';
|
|
7
|
+
import type { PaymentRecord, LoansPaymentSchedule } from '../debt/paymentTypes';
|
|
8
8
|
/**
|
|
9
9
|
*
|
|
10
10
|
* Calculates the extra amount in a payment after all loans' minimum payments are met
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"payments.d.ts","sourceRoot":"","sources":["../../../../src/lib/debt/payments.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAGH,OAAO,KAAK,EAAE,KAAK,EAAE,IAAI,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"payments.d.ts","sourceRoot":"","sources":["../../../../src/lib/debt/payments.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAGH,OAAO,KAAK,EAAE,KAAK,EAAE,IAAI,EAAE,MAAM,cAAc,CAAC;AAChD,OAAO,KAAK,EACV,aAAa,EAEb,oBAAoB,EACrB,MAAM,sBAAsB,CAAC;AAE9B;;;;;;;;GAQG;AACH,wBAAgB,qBAAqB,CACnC,KAAK,EAAE,KAAK,EAAE,EACd,OAAO,EAAE,MAAM,GACd,MAAM,CAYR;AAED;;;;;;;;;GASG;AACH,wBAAgB,kBAAkB,CAChC,IAAI,EAAE,IAAI,EACV,WAAW,EAAE,MAAM,EACnB,gBAAgB,EAAE,MAAM,EACxB,aAAa,EAAE,OAAO,GACrB,MAAM,CAOR;AAED;;;;;;;;;;;GAWG;AACH,wBAAgB,gBAAgB,CAC9B,IAAI,EAAE,IAAI,EACV,SAAS,EAAE,MAAM,EACjB,OAAO,EAAE,MAAM,GAAC,IAAI,EACpB,WAAW,EAAE,MAAM,GAAC,IAAI,EACxB,WAAW,GAAE,MAAU,EACvB,SAAS,GAAE,MAAU,GACpB,aAAa,EAAE,CA+BjB;AAED;;;;;;;;;GASG;AACH,wBAAgB,QAAQ,CACtB,KAAK,EAAE,IAAI,EAAE,EACb,OAAO,EAAE,MAAM,EACf,aAAa,GAAE,OAAe,GAC7B,oBAAoB,CAqItB"}
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* This file contains functions for computing detailed information on paying loans
|
|
4
4
|
*
|
|
5
5
|
*/
|
|
6
|
-
import * as errors from '
|
|
6
|
+
import * as errors from '../errors';
|
|
7
7
|
/**
|
|
8
8
|
*
|
|
9
9
|
* Calculates the extra amount in a payment after all loans' minimum payments are met
|
|
@@ -3,8 +3,8 @@
|
|
|
3
3
|
* This file containts functions for computing detailed information on contributing to investments
|
|
4
4
|
*
|
|
5
5
|
*/
|
|
6
|
-
import type { Instrument } from '
|
|
7
|
-
import { ContributionRecord, InstrumentsContributionSchedule } from '
|
|
6
|
+
import type { Instrument } from '../investment/instrument';
|
|
7
|
+
import { ContributionRecord, InstrumentsContributionSchedule } from '../investment/contributionTypes';
|
|
8
8
|
/**
|
|
9
9
|
*
|
|
10
10
|
* @param {IInstrument[]} instruments The instruments to allocate maximum contributions
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"contributions.d.ts","sourceRoot":"","sources":["../../../../src/lib/investment/contributions.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"contributions.d.ts","sourceRoot":"","sources":["../../../../src/lib/investment/contributions.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,0BAA0B,CAAC;AAC3D,OAAO,EACL,kBAAkB,EAClB,+BAA+B,EAGhC,MAAM,iCAAiC,CAAC;AAEzC;;;;;GAKG;AACH,wBAAgB,0BAA0B,CACxC,WAAW,EAAE,UAAU,EAAE,EACzB,YAAY,EAAE,MAAM,GACnB,MAAM,CAMR;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,oBAAoB,CAClC,UAAU,EAAE,UAAU,EACtB,cAAc,EAAE,MAAM,EACtB,YAAY,EAAE,MAAM,EACpB,WAAW,GAAE,MAAU,EACvB,wBAAwB,GAAE,OAAc,GACvC,kBAAkB,CAgBpB;AAED;;;;;;;;;;;;;GAaG;AACH,wBAAgB,qBAAqB,CACnC,UAAU,EAAE,UAAU,EACtB,cAAc,EAAE,MAAM,EACtB,YAAY,EAAE,MAAM,EACpB,gBAAgB,EAAE,MAAM,EACxB,WAAW,GAAE,MAAU,EACvB,wBAAwB,GAAE,OAAc,GACvC,kBAAkB,EAAE,CAkBtB;AAED;;;;;;;;;GASG;AACH,wBAAgB,qBAAqB,CACnC,WAAW,EAAE,UAAU,EAAE,EACzB,YAAY,EAAE,MAAM,EACpB,gBAAgB,EAAE,MAAM,EACxB,wBAAwB,GAAE,OAAc,GACvC,+BAA+B,CA6FjC"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Represents a financial instrument for investments and drawdowns.
|
|
3
3
|
*/
|
|
4
|
-
import { HasRateAndBalance } from '
|
|
4
|
+
import { HasRateAndBalance } from '../shared/sorting';
|
|
5
5
|
export interface IInstrument extends HasRateAndBalance {
|
|
6
6
|
id: string;
|
|
7
7
|
name: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"instrument.d.ts","sourceRoot":"","sources":["../../../../src/lib/investment/instrument.ts"],"names":[],"mappings":"AAAA;;GAEG;AAGH,OAAO,EAAE,iBAAiB,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"instrument.d.ts","sourceRoot":"","sources":["../../../../src/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*/
|
|
4
|
-
import * as errors from '
|
|
5
|
-
import * as primitives from '
|
|
4
|
+
import * as errors from '../errors';
|
|
5
|
+
import * as primitives from '../shared/primitives';
|
|
6
6
|
export class Instrument {
|
|
7
7
|
/**
|
|
8
8
|
* @constructor
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* This file contains high-level drawdown strategies for investment portfolios.
|
|
3
3
|
*/
|
|
4
|
-
import { Instrument } from '
|
|
5
|
-
import { InstrumentsWithdrawalSchedule } from '
|
|
4
|
+
import { Instrument } from '../investment/instrument';
|
|
5
|
+
import { InstrumentsWithdrawalSchedule } from '../investment/withdrawalTypes';
|
|
6
6
|
/**
|
|
7
7
|
* Executes a 'Waterfall' drawdown strategy.
|
|
8
8
|
* Funds are pulled from instruments in the order they appear in the array.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"strategies.d.ts","sourceRoot":"","sources":["../../../../src/lib/investment/strategies.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,UAAU,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"strategies.d.ts","sourceRoot":"","sources":["../../../../src/lib/investment/strategies.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,UAAU,EAAE,MAAM,0BAA0B,CAAC;AAEtD,OAAO,EACL,6BAA6B,EAE9B,MAAM,+BAA+B,CAAC;AAGvC;;;;;;;;;;;GAWG;AACH,wBAAgB,wBAAwB,CACtC,oBAAoB,EAAE,UAAU,EAAE,EAClC,uBAAuB,EAAE,MAAM,EAC/B,sBAAsB,EAAE,MAAM,EAC9B,gBAAgB,GAAE,MAAU,GAC3B,6BAA6B,CAsE/B"}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* This file contains high-level drawdown strategies for investment portfolios.
|
|
3
3
|
*/
|
|
4
|
-
import { calculateAmortizedWithdrawal } from '
|
|
5
|
-
import { TOTALS } from '
|
|
4
|
+
import { calculateAmortizedWithdrawal } from '../investment/withdrawals';
|
|
5
|
+
import { TOTALS } from '../constants';
|
|
6
6
|
/**
|
|
7
7
|
* Executes a 'Waterfall' drawdown strategy.
|
|
8
8
|
* Funds are pulled from instruments in the order they appear in the array.
|
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
* This file contains functions for computing detailed information on drawing
|
|
3
3
|
* down investment instruments during retirement distribution.
|
|
4
4
|
*/
|
|
5
|
-
import { Instrument } from '
|
|
6
|
-
import { WithdrawalRecord, InstrumentsWithdrawalSchedule } from '
|
|
5
|
+
import { Instrument } from '../investment/instrument';
|
|
6
|
+
import { WithdrawalRecord, InstrumentsWithdrawalSchedule } from '../investment/withdrawalTypes';
|
|
7
7
|
/**
|
|
8
8
|
* Calculates a single period's withdrawal record.
|
|
9
9
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"withdrawals.d.ts","sourceRoot":"","sources":["../../../../src/lib/investment/withdrawals.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAIH,OAAO,EAAE,UAAU,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"withdrawals.d.ts","sourceRoot":"","sources":["../../../../src/lib/investment/withdrawals.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAIH,OAAO,EAAE,UAAU,EAAE,MAAM,0BAA0B,CAAC;AACtD,OAAO,EACL,gBAAgB,EAChB,6BAA6B,EAE9B,MAAM,+BAA+B,CAAC;AAEvC;;;;;;;;;;GAUG;AACH,wBAAgB,4BAA4B,CAC1C,UAAU,EAAE,UAAU,EACtB,wBAAwB,EAAE,MAAM,EAChC,wBAAwB,EAAE,MAAM,EAChC,oBAAoB,GAAE,MAAU,EAChC,iBAAiB,GAAE,MAAU,EAC7B,sBAAsB,GAAE,OAAc,GACrC,gBAAgB,CAqClB;AAED;;;;;;;;;GASG;AACH,wBAAgB,mBAAmB,CACjC,WAAW,EAAE,UAAU,EAAE,EACzB,uBAAuB,EAAE,MAAM,EAC/B,sBAAsB,EAAE,MAAM,EAC9B,gBAAgB,GAAE,MAAU,EAC5B,sBAAsB,GAAE,OAAc,GACrC,6BAA6B,CAsE/B"}
|
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
* This file contains functions for computing detailed information on drawing
|
|
3
3
|
* down investment instruments during retirement distribution.
|
|
4
4
|
*/
|
|
5
|
-
import { TOTALS } from '
|
|
6
|
-
import * as errors from '
|
|
5
|
+
import { TOTALS } from '../constants';
|
|
6
|
+
import * as errors from '../errors';
|
|
7
7
|
/**
|
|
8
8
|
* Calculates a single period's withdrawal record.
|
|
9
9
|
*
|
|
@@ -45,7 +45,7 @@ describe('moneyfunx module', () => {
|
|
|
45
45
|
'WithdrawalRecord',
|
|
46
46
|
'WithdrawalSchedule',
|
|
47
47
|
'InstrumentsWithdrawalSchedule',
|
|
48
|
-
|
|
48
|
+
'performWaterfallDrawdown',
|
|
49
49
|
// Shared Math Primitives
|
|
50
50
|
'calculatePeriodicAmount',
|
|
51
51
|
'calculateBalanceRemaining',
|