@archerjessop/utilities 7.30.0 → 7.31.0
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.
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
const e={EBITDA_ADVANCE_RATE:.2,EBITDA_ADVANCE_THRESHOLD:1e6,FF_E_ADVANCE_RATE:.3,INVENTORY_ADVANCE_RATE:.2,OFFER_MULTIPLE_HIGH:3,OFFER_MULTIPLE_LOW:2,REAL_ESTATE_ADVANCE_RATE:.5};function toNumber(e){if(null==e||""===e)return null;const n="number"==typeof e?e:parseFloat(String(e).replace(/[$,\s]/g,""));return Number.isFinite(n)?n:null}function toNonNegative(e){const n=toNumber(e);return null===n||n<0?null:n}function resolveBusinessEarnings(e={}){const n=toNumber(e.ebitda);if(null!==n)return{earnings:n,source:"ebitda"};const t=toNumber(e.sde);if(null!==t)return{earnings:t,source:"sde"};const l=toNumber(e.cashFlow??e.cash_flow);return null!==l?{earnings:l,source:"cash_flow"}:{earnings:null,source:null}}function shouldIncludeRealEstate(e={}){if("boolean"==typeof e.statedInclusion)return e.statedInclusion;const n=toNumber(e.askingPrice),t=toNumber(e.realEstateValue);return!(null!==n&&n>0&&null!==t&&t>=n)}function calculateBusinessDownPayment(n={}){const{EBITDA_ADVANCE_RATE:t,EBITDA_ADVANCE_THRESHOLD:l,FF_E_ADVANCE_RATE:s,INVENTORY_ADVANCE_RATE:a,REAL_ESTATE_ADVANCE_RATE:u}=e,r=toNonNegative(n.realEstateValue)??0,o=toNonNegative(n.ffeValue)??0,i=toNonNegative(n.inventoryValue)??0,c=toNumber(n.ebitda)??0,f={ebitda:c>=l?c*t:0,ffe:o*s,inventory:i*a,realEstate:r*u};return{downPayment:f.realEstate+f.ffe+f.inventory+f.ebitda,legs:f}}function calculateBusinessOffer(n={}){const{OFFER_MULTIPLE_HIGH:t,OFFER_MULTIPLE_LOW:l}=e,{includeFfe:s=!0,includeInventory:a=!0,includeRealEstate:u=!0}=n,r=(u?toNonNegative(n.realEstateValue)??0:0)+(s?toNonNegative(n.ffeValue)??0:0)+(a?toNonNegative(n.inventoryValue)??0:0),o=toNumber(n.earnings);return null===o?{assetsIncluded:r,offerHigh:null,offerLow:null}:{assetsIncluded:r,offerHigh:o*t+r,offerLow:o*l+r}}function underwriteBusinessListing(e={}){const n=e.realEstateValue??e.real_estate_value,t=e.ffeValue??e.ff_e_value,l=e.inventoryValue??e.inventory_value,s=e.ebitda,{earnings:a,source:u}=resolveBusinessEarnings({cashFlow:e.cashFlow??e.cash_flow,ebitda:s,sde:e.sde}),{downPayment:r,legs:o}=calculateBusinessDownPayment({ebitda:s,ffeValue:t,inventoryValue:l,realEstateValue:n}),{assetsIncluded:i,offerHigh:c,offerLow:f}=calculateBusinessOffer({earnings:a,ffeValue:t,includeFfe:e.includeFfe??e.include_ff_e??!0,includeInventory:e.includeInventory??e.include_inventory??!0,includeRealEstate:e.includeRealEstate??e.include_real_estate??!0,inventoryValue:l,realEstateValue:n});return{assetsIncluded:i,collateralShortfall:null!==c&&r>c,downPayment:r,earnings:a,earningsSource:e.earningsSource??e.earnings_source??u,legs:o,offerHigh:c,offerLow:f,sellerCarry:null===c?null:c-r}}export{e as BUSINESS_UNDERWRITING_CONSTANTS,calculateBusinessDownPayment,calculateBusinessOffer,resolveBusinessEarnings,shouldIncludeRealEstate,underwriteBusinessListing};
|
|
2
|
+
//# sourceMappingURL=business-underwriting.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"business-underwriting.js","sources":["../../src/financial/business-underwriting.js"],"sourcesContent":["// src/financial/business-underwriting.js\n//\n// Underwriting for businesses backed by real estate (the BizBuySell pipeline).\n// The real-estate model prices a property off NOI and a cap rate; this one\n// prices a business off an earnings multiple and adds the tangible assets that\n// convey with it. Shared by the BizBuySell extension panel and the dashboard so\n// both quote the same numbers from the same inputs.\n\n/**\n * Collateral advance rates for the down payment, and the earnings multiples\n * bounding the offer. The EBITDA leg only contributes at or above its threshold\n * — smaller earnings are not treated as collateral.\n */\nexport const BUSINESS_UNDERWRITING_CONSTANTS = {\n EBITDA_ADVANCE_RATE: 0.20,\n EBITDA_ADVANCE_THRESHOLD: 1000000,\n FF_E_ADVANCE_RATE: 0.30,\n INVENTORY_ADVANCE_RATE: 0.20,\n OFFER_MULTIPLE_HIGH: 3,\n OFFER_MULTIPLE_LOW: 2,\n REAL_ESTATE_ADVANCE_RATE: 0.50,\n};\n\n// Coerce a scraped/stored figure to a finite number, else null. Absent data must\n// stay absent — a missing earnings figure means \"no offer\", never \"an offer of 0\".\nfunction toNumber(value) {\n if (value === null || value === undefined || value === \"\") return null;\n const numeric = typeof value === \"number\" ? value : parseFloat(String(value).replace(/[$,\\s]/g, \"\"));\n return Number.isFinite(numeric) ? numeric : null;\n}\n\nfunction toNonNegative(value) {\n const numeric = toNumber(value);\n return numeric === null || numeric < 0 ? null : numeric;\n}\n\n/**\n * Pick the earnings figure that drives the offer multiple, preferring EBITDA and\n * falling back to SDE then cash flow — most BizBuySell listings publish only\n * \"Cash Flow (SDE)\". The source is returned alongside so callers can label which\n * figure the multiple was applied to instead of implying it was EBITDA.\n * @param {{ebitda?:number, sde?:number, cashFlow?:number}} listing\n * @returns {{earnings:number|null, source:string|null}}\n */\nexport function resolveBusinessEarnings(listing = {}) {\n const ebitda = toNumber(listing.ebitda);\n if (ebitda !== null) return { earnings: ebitda, source: \"ebitda\" };\n\n const sde = toNumber(listing.sde);\n if (sde !== null) return { earnings: sde, source: \"sde\" };\n\n const cashFlow = toNumber(listing.cashFlow ?? listing.cash_flow);\n if (cashFlow !== null) return { earnings: cashFlow, source: \"cash_flow\" };\n\n return { earnings: null, source: null };\n}\n\n/**\n * Whether the real estate should be ADDED to the offer on top of the earnings multiple.\n *\n * Three inputs, in priority order:\n * 1. What the listing says. Explicit wording (\"included in asking price\", or its negation)\n * is a statement of fact from the seller and always wins.\n * 2. The arithmetic. When the stated real-estate value is at or above the asking price,\n * the building IS the ask — adding it again would quote an offer ceiling above the\n * price being asked, which is nonsense. This is the common case on listings that\n * publish a real-estate value and no inclusion wording at all.\n * 3. Otherwise include it, matching the default for every other asset: understating an\n * offer by silently dropping an asset is worse than an inclusion that can be toggled\n * off by hand.\n *\n * @param {{askingPrice?:number, realEstateValue?:number, statedInclusion?:boolean|null}} inputs\n * @returns {boolean}\n */\nexport function shouldIncludeRealEstate(inputs = {}) {\n if (typeof inputs.statedInclusion === \"boolean\") return inputs.statedInclusion;\n\n const askingPrice = toNumber(inputs.askingPrice);\n const realEstateValue = toNumber(inputs.realEstateValue);\n\n if (askingPrice !== null && askingPrice > 0 && realEstateValue !== null && realEstateValue >= askingPrice) {\n return false;\n }\n\n return true;\n}\n\n/**\n * Down payment as the sum of per-asset collateral advances: 50% of the real\n * estate, 30% of FF&E, 20% of inventory, plus 20% of EBITDA once EBITDA reaches\n * $1M. Each leg is capped at its own rate, and a leg with no reported value\n * contributes nothing.\n *\n * The EBITDA leg reads EBITDA specifically, not the coalesced earnings figure —\n * an SDE-only listing does not qualify, because SDE includes owner compensation\n * and is not the same measure the threshold was set against.\n *\n * @param {{realEstateValue?:number, ffeValue?:number, inventoryValue?:number, ebitda?:number}} inputs\n * @returns {{downPayment:number, legs:{realEstate:number, ffe:number, inventory:number, ebitda:number}}}\n */\nexport function calculateBusinessDownPayment(inputs = {}) {\n const {\n EBITDA_ADVANCE_RATE,\n EBITDA_ADVANCE_THRESHOLD,\n FF_E_ADVANCE_RATE,\n INVENTORY_ADVANCE_RATE,\n REAL_ESTATE_ADVANCE_RATE,\n } = BUSINESS_UNDERWRITING_CONSTANTS;\n\n const realEstateValue = toNonNegative(inputs.realEstateValue) ?? 0;\n const ffeValue = toNonNegative(inputs.ffeValue) ?? 0;\n const inventoryValue = toNonNegative(inputs.inventoryValue) ?? 0;\n const ebitda = toNumber(inputs.ebitda) ?? 0;\n\n const legs = {\n ebitda: ebitda >= EBITDA_ADVANCE_THRESHOLD ? ebitda * EBITDA_ADVANCE_RATE : 0,\n ffe: ffeValue * FF_E_ADVANCE_RATE,\n inventory: inventoryValue * INVENTORY_ADVANCE_RATE,\n realEstate: realEstateValue * REAL_ESTATE_ADVANCE_RATE,\n };\n\n return {\n downPayment: legs.realEstate + legs.ffe + legs.inventory + legs.ebitda,\n legs,\n };\n}\n\n/**\n * The offer range: 2x to 3x earnings, plus the tangible assets that convey.\n * An asset the listing states is already covered by the asking price is excluded\n * by its include flag; the flags default to true, so an asset whose status could\n * not be determined is still offered on (dropping it silently would understate\n * the offer, which is the more damaging error).\n *\n * Returns nulls when no earnings figure exists — there is no honest multiple to\n * take, and quoting the assets alone would read as an offer.\n *\n * @param {object} inputs\n * @param {number} inputs.earnings - Earnings figure the multiple applies to\n * @param {number} [inputs.realEstateValue]\n * @param {number} [inputs.ffeValue]\n * @param {number} [inputs.inventoryValue]\n * @param {boolean} [inputs.includeRealEstate=true]\n * @param {boolean} [inputs.includeFfe=true]\n * @param {boolean} [inputs.includeInventory=true]\n * @returns {{assetsIncluded:number, offerHigh:number|null, offerLow:number|null}}\n */\nexport function calculateBusinessOffer(inputs = {}) {\n const { OFFER_MULTIPLE_HIGH, OFFER_MULTIPLE_LOW } = BUSINESS_UNDERWRITING_CONSTANTS;\n\n const {\n includeFfe = true,\n includeInventory = true,\n includeRealEstate = true,\n } = inputs;\n\n const assetsIncluded =\n (includeRealEstate ? toNonNegative(inputs.realEstateValue) ?? 0 : 0) +\n (includeFfe ? toNonNegative(inputs.ffeValue) ?? 0 : 0) +\n (includeInventory ? toNonNegative(inputs.inventoryValue) ?? 0 : 0);\n\n const earnings = toNumber(inputs.earnings);\n if (earnings === null) return { assetsIncluded, offerHigh: null, offerLow: null };\n\n return {\n assetsIncluded,\n offerHigh: earnings * OFFER_MULTIPLE_HIGH + assetsIncluded,\n offerLow: earnings * OFFER_MULTIPLE_LOW + assetsIncluded,\n };\n}\n\n/**\n * Full underwrite for one listing: resolve earnings, size the down payment from\n * collateral, and bound the offer. The seller carries the balance of the ceiling\n * offer as preferred equity.\n *\n * collateralShortfall is set when the collateral-driven down payment exceeds the\n * offer itself — a real signal that the asset value has outrun what the earnings\n * multiple justifies. It is surfaced, never clamped away.\n *\n * @param {object} listing - Scraped/stored figures (snake_case or camelCase)\n * @returns {object} earnings, earningsSource, downPayment, legs, offerLow, offerHigh, sellerCarry, collateralShortfall\n */\nexport function underwriteBusinessListing(listing = {}) {\n const realEstateValue = listing.realEstateValue ?? listing.real_estate_value;\n const ffeValue = listing.ffeValue ?? listing.ff_e_value;\n const inventoryValue = listing.inventoryValue ?? listing.inventory_value;\n const ebitda = listing.ebitda;\n\n const { earnings, source } = resolveBusinessEarnings({\n cashFlow: listing.cashFlow ?? listing.cash_flow,\n ebitda,\n sde: listing.sde,\n });\n\n const { downPayment, legs } = calculateBusinessDownPayment({\n ebitda,\n ffeValue,\n inventoryValue,\n realEstateValue,\n });\n\n const { assetsIncluded, offerHigh, offerLow } = calculateBusinessOffer({\n earnings,\n ffeValue,\n includeFfe: listing.includeFfe ?? listing.include_ff_e ?? true,\n includeInventory: listing.includeInventory ?? listing.include_inventory ?? true,\n includeRealEstate: listing.includeRealEstate ?? listing.include_real_estate ?? true,\n inventoryValue,\n realEstateValue,\n });\n\n return {\n assetsIncluded,\n collateralShortfall: offerHigh !== null && downPayment > offerHigh,\n downPayment,\n earnings,\n earningsSource: listing.earningsSource ?? listing.earnings_source ?? source,\n legs,\n offerHigh,\n offerLow,\n sellerCarry: offerHigh === null ? null : offerHigh - downPayment,\n };\n}\n"],"names":["BUSINESS_UNDERWRITING_CONSTANTS","EBITDA_ADVANCE_RATE","EBITDA_ADVANCE_THRESHOLD","FF_E_ADVANCE_RATE","INVENTORY_ADVANCE_RATE","OFFER_MULTIPLE_HIGH","OFFER_MULTIPLE_LOW","REAL_ESTATE_ADVANCE_RATE","toNumber","value","numeric","parseFloat","String","replace","Number","isFinite","toNonNegative","resolveBusinessEarnings","listing","ebitda","earnings","source","sde","cashFlow","cash_flow","shouldIncludeRealEstate","inputs","statedInclusion","askingPrice","realEstateValue","calculateBusinessDownPayment","ffeValue","inventoryValue","legs","ffe","inventory","realEstate","downPayment","calculateBusinessOffer","includeFfe","includeInventory","includeRealEstate","assetsIncluded","offerHigh","offerLow","underwriteBusinessListing","real_estate_value","ff_e_value","inventory_value","include_ff_e","include_inventory","include_real_estate","collateralShortfall","earningsSource","earnings_source","sellerCarry"],"mappings":"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"}
|
package/dist/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export{calculateAppreciatedValue,calculateAssignmentFee,calculateBalloonBalance,calculateCOCR30,calculateCOCRAtPercent,calculateCashFlow,calculateCashFlowYield,calculateCashOfferPrice,calculateCashOutAfterRefi,calculateDiscountFromPrice,calculateNOIByType,calculateNetToBuyer,calculatePMT,calculatePriceForCOCR,calculatePriceFromDiscount,calculateSTRNOI,calculateSellerFinanceOffer,equityPercentFromDebt,resolveListingFinancials,safePercentage}from"./financial/calculations.js";export{EQUITY_CARRY_TIERS,calculateEquityCarryScore}from"./financial/equity-carry.js";export{fetchDebt}from"./services/debt.js";export{formatCurrency,formatPercentage,formatPriceValue}from"./financial/formatters.js";export{calculateOriginalPrice,convertCapRateToDecimal,createExportObjectCore,formatDownPaymentPercent,mapPropertyType}from"./export/export-logic.js";export{calculateDOM,formatDate}from"./date/utilities.js";export{calculateCursorPosition,extractNumericValue,filterNumericInput,formatInputDisplay,formatLiveInput,formatLiveNumber,parseNumericInput}from"./formatting/financial-formatting.js";export{normalizeWhitespace}from"./formatting/text.js";export{CALCULATION_TOLERANCE,DEFAULT_CAP_RATE,DEFAULT_DOWN_PAYMENT,DEFAULT_DSCR_PERCENTAGE,DEFAULT_EQUITY_ESTIMATE,DEFAULT_INTEREST_RATE_TYPE,FINANCIAL_CONSTANTS,INTEREST_RATE_TIERS,MAX_ITERATIONS,SELLER_FI_AMORTIZATION,SELLER_FI_CARRY,SELLER_FI_DOWN_PAYMENT,SELLER_FI_INTEREST_RATE,determineInterestRateType}from"./config/financial.js";export{ASSISTED_LIVING,MULTIFAMILY,PROPERTY_TYPES,PROPERTY_TYPE_CONSTANTS,STR}from"./config/property-types.js";export{ASSIGNMENT_FEE_PERCENTAGE,BUSINESS_CONSTANTS,BUYER_AGENT_COMMISSION,CASH_OFFER_ASSIGNMENT_PERCENTAGE,CASH_OFFER_ROUNDING,CLOSING_COSTS_PERCENTAGE,CONSERVATIVE_COCR15_PRICE_MULTIPLIER,HARD_MONEY_RATE,MAX_COCR15_PRICE_MULTIPLIER,MINIMUM_COCR15_PRICE,NET_TO_BUYER_PERCENTAGE,REHAB_RATE,SELLER_AGENT_COMMISSION,SELLER_FINANCE_MAX_DOWN_PERCENT}from"./config/business.js";export{lookupLOI}from"./services/loi-lookup.js";export{LOI_LOOKUP_CONFIG,LOI_SENT_STATUS,MATCH_TYPES}from"./config/loi-lookup.js";export{getEnvVar,isBrowserEnvironment,isNodeEnvironment}from"./environment/utilities.js";const e="./dist/styles/base.css";export{e as STYLES_PATH};
|
|
1
|
+
export{calculateAppreciatedValue,calculateAssignmentFee,calculateBalloonBalance,calculateCOCR30,calculateCOCRAtPercent,calculateCashFlow,calculateCashFlowYield,calculateCashOfferPrice,calculateCashOutAfterRefi,calculateDiscountFromPrice,calculateNOIByType,calculateNetToBuyer,calculatePMT,calculatePriceForCOCR,calculatePriceFromDiscount,calculateSTRNOI,calculateSellerFinanceOffer,equityPercentFromDebt,resolveListingFinancials,safePercentage}from"./financial/calculations.js";export{EQUITY_CARRY_TIERS,calculateEquityCarryScore}from"./financial/equity-carry.js";export{BUSINESS_UNDERWRITING_CONSTANTS,calculateBusinessDownPayment,calculateBusinessOffer,resolveBusinessEarnings,shouldIncludeRealEstate,underwriteBusinessListing}from"./financial/business-underwriting.js";export{fetchDebt}from"./services/debt.js";export{formatCurrency,formatPercentage,formatPriceValue}from"./financial/formatters.js";export{calculateOriginalPrice,convertCapRateToDecimal,createExportObjectCore,formatDownPaymentPercent,mapPropertyType}from"./export/export-logic.js";export{calculateDOM,formatDate}from"./date/utilities.js";export{calculateCursorPosition,extractNumericValue,filterNumericInput,formatInputDisplay,formatLiveInput,formatLiveNumber,parseNumericInput}from"./formatting/financial-formatting.js";export{normalizeWhitespace}from"./formatting/text.js";export{CALCULATION_TOLERANCE,DEFAULT_CAP_RATE,DEFAULT_DOWN_PAYMENT,DEFAULT_DSCR_PERCENTAGE,DEFAULT_EQUITY_ESTIMATE,DEFAULT_INTEREST_RATE_TYPE,FINANCIAL_CONSTANTS,INTEREST_RATE_TIERS,MAX_ITERATIONS,SELLER_FI_AMORTIZATION,SELLER_FI_CARRY,SELLER_FI_DOWN_PAYMENT,SELLER_FI_INTEREST_RATE,determineInterestRateType}from"./config/financial.js";export{ASSISTED_LIVING,MULTIFAMILY,PROPERTY_TYPES,PROPERTY_TYPE_CONSTANTS,STR}from"./config/property-types.js";export{ASSIGNMENT_FEE_PERCENTAGE,BUSINESS_CONSTANTS,BUYER_AGENT_COMMISSION,CASH_OFFER_ASSIGNMENT_PERCENTAGE,CASH_OFFER_ROUNDING,CLOSING_COSTS_PERCENTAGE,CONSERVATIVE_COCR15_PRICE_MULTIPLIER,HARD_MONEY_RATE,MAX_COCR15_PRICE_MULTIPLIER,MINIMUM_COCR15_PRICE,NET_TO_BUYER_PERCENTAGE,REHAB_RATE,SELLER_AGENT_COMMISSION,SELLER_FINANCE_MAX_DOWN_PERCENT}from"./config/business.js";export{lookupLOI}from"./services/loi-lookup.js";export{LOI_LOOKUP_CONFIG,LOI_SENT_STATUS,MATCH_TYPES}from"./config/loi-lookup.js";export{getEnvVar,isBrowserEnvironment,isNodeEnvironment}from"./environment/utilities.js";const e="./dist/styles/base.css";export{e as STYLES_PATH};
|
|
2
2
|
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../src/index.js"],"sourcesContent":["/**\r\n * @archerjessop/utilities\r\n * Shared utilities for ArcherJessop property analysis tools\r\n */\r\n\r\n// Financial calculations\r\nexport { \r\n calculateAppreciatedValue,\r\n calculateAssignmentFee,\r\n calculateBalloonBalance,\r\n calculateCashFlow,\r\n calculateCashFlowYield,\r\n calculateCashOfferPrice,\r\n calculateCashOutAfterRefi,\r\n calculateCOCR30, \r\n calculateCOCRAtPercent,\r\n calculateDiscountFromPrice,\r\n calculateNetToBuyer,\r\n calculateNOIByType,\r\n calculatePMT,\r\n calculatePriceForCOCR,\r\n calculatePriceFromDiscount,\r\n calculateSellerFinanceOffer,\r\n calculateSTRNOI,\r\n equityPercentFromDebt,\r\n resolveListingFinancials,\r\n safePercentage,\r\n} from \"./financial/calculations.js\";\r\n\r\n// Equity Carry scoring engine (pure; scores scraped listings into deal pools)\r\nexport { EQUITY_CARRY_TIERS, calculateEquityCarryScore } from \"./financial/equity-carry.js\";\r\n\r\n// Agnostic debt service (pure IO; Node + browser)\r\nexport { fetchDebt } from \"./services/debt.js\";\r\n\r\n// Financial formatters\r\nexport { formatCurrency, formatPriceValue, formatPercentage } from \"./financial/formatters.js\";\r\n\r\n// Export logic (pure export-object creation)\r\nexport {\r\n calculateOriginalPrice,\r\n convertCapRateToDecimal,\r\n createExportObjectCore,\r\n formatDownPaymentPercent,\r\n mapPropertyType,\r\n} from \"./export/export-logic.js\";\r\n\r\n// Date utilities\r\nexport { calculateDOM, formatDate } from \"./date/utilities.js\";\r\n\r\n// Formatting utilities\r\nexport { \r\n calculateCursorPosition,\r\n extractNumericValue,\r\n filterNumericInput,\r\n formatInputDisplay,\r\n formatLiveInput,\r\n formatLiveNumber,\r\n parseNumericInput\r\n} from \"./formatting/financial-formatting.js\";\r\n\r\n// Text formatting utilities\r\nexport { normalizeWhitespace } from \"./formatting/text.js\";\r\n\r\n// Configuration constants\r\nexport * from \"./config/financial.js\";\r\nexport * from \"./config/property-types.js\";\r\nexport * from \"./config/business.js\";\r\n\r\nexport const STYLES_PATH = \"./dist/styles/base.css\";\r\n\r\n// LOI Lookup service and config\r\nexport { lookupLOI } from \"./services/loi-lookup.js\";\r\nexport { LOI_LOOKUP_CONFIG, MATCH_TYPES, LOI_SENT_STATUS } from \"./config/loi-lookup.js\";\r\n\r\n// Environment utilities\r\nexport { \r\n getEnvVar, \r\n isNodeEnvironment, \r\n isBrowserEnvironment \r\n} from \"./environment/utilities.js\";"],"names":["STYLES_PATH"],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../src/index.js"],"sourcesContent":["/**\r\n * @archerjessop/utilities\r\n * Shared utilities for ArcherJessop property analysis tools\r\n */\r\n\r\n// Financial calculations\r\nexport { \r\n calculateAppreciatedValue,\r\n calculateAssignmentFee,\r\n calculateBalloonBalance,\r\n calculateCashFlow,\r\n calculateCashFlowYield,\r\n calculateCashOfferPrice,\r\n calculateCashOutAfterRefi,\r\n calculateCOCR30, \r\n calculateCOCRAtPercent,\r\n calculateDiscountFromPrice,\r\n calculateNetToBuyer,\r\n calculateNOIByType,\r\n calculatePMT,\r\n calculatePriceForCOCR,\r\n calculatePriceFromDiscount,\r\n calculateSellerFinanceOffer,\r\n calculateSTRNOI,\r\n equityPercentFromDebt,\r\n resolveListingFinancials,\r\n safePercentage,\r\n} from \"./financial/calculations.js\";\r\n\r\n// Equity Carry scoring engine (pure; scores scraped listings into deal pools)\r\nexport { EQUITY_CARRY_TIERS, calculateEquityCarryScore } from \"./financial/equity-carry.js\";\r\n\r\n// Business-backed-by-real-estate underwriting (pure; offer range + collateral down payment)\r\nexport {\r\n BUSINESS_UNDERWRITING_CONSTANTS,\r\n calculateBusinessDownPayment,\r\n calculateBusinessOffer,\r\n resolveBusinessEarnings,\r\n shouldIncludeRealEstate,\r\n underwriteBusinessListing,\r\n} from \"./financial/business-underwriting.js\";\r\n\r\n// Agnostic debt service (pure IO; Node + browser)\r\nexport { fetchDebt } from \"./services/debt.js\";\r\n\r\n// Financial formatters\r\nexport { formatCurrency, formatPriceValue, formatPercentage } from \"./financial/formatters.js\";\r\n\r\n// Export logic (pure export-object creation)\r\nexport {\r\n calculateOriginalPrice,\r\n convertCapRateToDecimal,\r\n createExportObjectCore,\r\n formatDownPaymentPercent,\r\n mapPropertyType,\r\n} from \"./export/export-logic.js\";\r\n\r\n// Date utilities\r\nexport { calculateDOM, formatDate } from \"./date/utilities.js\";\r\n\r\n// Formatting utilities\r\nexport { \r\n calculateCursorPosition,\r\n extractNumericValue,\r\n filterNumericInput,\r\n formatInputDisplay,\r\n formatLiveInput,\r\n formatLiveNumber,\r\n parseNumericInput\r\n} from \"./formatting/financial-formatting.js\";\r\n\r\n// Text formatting utilities\r\nexport { normalizeWhitespace } from \"./formatting/text.js\";\r\n\r\n// Configuration constants\r\nexport * from \"./config/financial.js\";\r\nexport * from \"./config/property-types.js\";\r\nexport * from \"./config/business.js\";\r\n\r\nexport const STYLES_PATH = \"./dist/styles/base.css\";\r\n\r\n// LOI Lookup service and config\r\nexport { lookupLOI } from \"./services/loi-lookup.js\";\r\nexport { LOI_LOOKUP_CONFIG, MATCH_TYPES, LOI_SENT_STATUS } from \"./config/loi-lookup.js\";\r\n\r\n// Environment utilities\r\nexport { \r\n getEnvVar, \r\n isNodeEnvironment, \r\n isBrowserEnvironment \r\n} from \"./environment/utilities.js\";"],"names":["STYLES_PATH"],"mappings":"i1EA+EY,MAACA,EAAc"}
|