UNPKG
@votemike/property
Version:
latest (0.2.0)
0.2.0
0.1.2
0.1.1
0.1.0
0.0.5
0.0.4
0.0.3
0.0.2
Property class and related classes
@votemike/property
/
dist
/
src
/
sale.js
11 lines
(10 loc)
•
279 B
JavaScript
View Raw
1
2
3
4
5
6
7
8
9
10
11
export
default
class
Sale
{
constructor
(
amount, fees
) {
this
.
amount
= amount;
this
.
fees
= fees; }
calculateTotalCosts
(
) {
const
feeCosts =
this
.
fees
.
reduce
(
(
total, fee
) =>
fee.
amount
+ total,
0
);
return
this
.
amount
+ feeCosts; } }