@doctadevs/utils
Advanced tools
Comparing version 0.0.24 to 0.0.25
@@ -1,3 +0,4 @@ | ||
import { CardInstallment } from '@doctadevs/types'; | ||
import { CardInstallment, PriceCalculationResponse } from '@doctadevs/types'; | ||
export declare const getInstallmentValue: (amountToSplit: number, installmentRate: number, installmentsToPay: number) => number; | ||
export declare const getMaxInstallmentsWithZeroCFT: (installments: CardInstallment[]) => CardInstallment; | ||
export declare const getFinalPrice: ({ totalDiscountAmount, discountPrice, basePrice }: PriceCalculationResponse) => number; |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.getMaxInstallmentsWithZeroCFT = exports.getInstallmentValue = void 0; | ||
exports.getFinalPrice = exports.getMaxInstallmentsWithZeroCFT = exports.getInstallmentValue = void 0; | ||
const getInstallmentValue = (amountToSplit, installmentRate, installmentsToPay) => { | ||
@@ -20,2 +20,4 @@ const pureInstallmentValue = amountToSplit / installmentsToPay; | ||
exports.getMaxInstallmentsWithZeroCFT = getMaxInstallmentsWithZeroCFT; | ||
const getFinalPrice = ({ totalDiscountAmount, discountPrice, basePrice }) => totalDiscountAmount > 0 ? discountPrice : basePrice; | ||
exports.getFinalPrice = getFinalPrice; | ||
//# sourceMappingURL=finance.js.map |
{ | ||
"name": "@doctadevs/utils", | ||
"version": "0.0.24", | ||
"version": "0.0.25", | ||
"main": "dist/index.js", | ||
@@ -34,3 +34,3 @@ "types": "dist/index.d.ts", | ||
"dependencies": { | ||
"@doctadevs/types": "^0.0.43", | ||
"@doctadevs/types": "^0.0.47", | ||
"@types/uuid": "^8.3.1", | ||
@@ -37,0 +37,0 @@ "cross-fetch": "^3.1.4", |
@@ -1,2 +0,2 @@ | ||
import { CardInstallment } from '@doctadevs/types'; | ||
import { CardInstallment, PriceCalculationResponse } from '@doctadevs/types'; | ||
@@ -22,1 +22,4 @@ export const getInstallmentValue = ( | ||
}; | ||
export const getFinalPrice = ({ totalDiscountAmount, discountPrice, basePrice }: PriceCalculationResponse): number => | ||
totalDiscountAmount > 0 ? discountPrice : basePrice; |
Sorry, the diff of this file is not supported yet
17918
308
+ Added@doctadevs/types@0.0.47(transitive)
- Removed@doctadevs/types@0.0.43(transitive)
Updated@doctadevs/types@^0.0.47