I urge you to look at the repo and specifically the underlying index.js file and see if you need to edit some code to get the data formatted in another way.
Note: I took out the console logs so it only returns a value. If you would like to console log the return value, just wrap a console log around the function
Note: if any of the arguments are irrelevant just place a 0 in it's proper place. It must still be there or else the function will throw an error
npm install --save real-estate-finance
import * as refin from 'real-estate-finance' || const refin = require('real-estate-finance');
-
All inputs are meant to be in their specifc order listed below and all inputs are meant to be Numbers, not Strings or Floats!
-
annualGrossPotentialIncome
refin.annualGrossPotentialIncome(expectedMonthlyRentIncome)
-
netOperatingIncome
refin.netOperatingIncome( monthlyIncome, vacancies, nonPayments, taxes, mortgageInterest, marketing, advertising, management, legal, accounting, utilities, repairs, maintenance, acquisition, sale_costs )
-
grossRentalMultiplier
refin.grossRentalMultiplier(marketValue, annualGrossPotentialIncome)
-
estimatedPropertyValueByGRM
refin.estimatedPropertyValueByGRM(grossRentalMultiplier, annualIncome)
-
grossOperatingIncome
refin.grossOperatingIncome(monthlyIncome, estimatedLossPercentage);
-
capitalizationRate
refin.capitalizationRate( monthlyIncome, vacancies, nonPayments, taxes, marketing, advertising, management, legal, accouting, utilities, repairs, maintenance, acquisition, sale_costs, sale_earned )
-
estimatedPropertyValueByCapRate
refin.estimatedPropertyValueByCapRate( netOperatingIncome, capitalizationRate )
-
cashFlowBeforeTaxes
refin.cashFlowBeforeTaxes( netOperatingIncome, interestRate, loanPrinciple, capitalExpenditures, capitalExpenditureLoans, earnedInterest )
-
cashFlowAfterTaxes
refin.cashFlowAfterTaxes( cashFlowBeforeTaxes, stateIncomeTax, federalIncomeTax )
-
breakEvenRatio
refin.breakEvenRatio( interestRate, loanPrinciple, marketing, advertising, management, legal, accounting, utilities, repairs, maintenance, grossOperatingIncome )
-
returnOnEquity
refin.returnOnEquity( cashFlowAfterTaxes, principleInvested )