@archerjessop/utilities 7.4.0 → 7.5.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.
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
function createExportObjectCore(e,t={}){const{cachedEquity:n=null,currentDownPaymentPercent:r,currentInterestRateType:a="dscr_residential",currentPriceDiscount:o=0,currentPropertyType:c="str",equitySource:i="scraped",isUsingEstimatedCapRate:s=!1,numberOfUnits:u=4,priceWasDefaulted:
|
|
1
|
+
function mapPropertyType(e){return{assisted:"assisted",business:"business",mixed_use:"mixed_use",multifamily:"mfr",rv_park:"rv_park",str:"str"}[e]||"mfr"}function createExportObjectCore(e,t={}){const{cachedEquity:n=null,currentDownPaymentPercent:r,currentInterestRateType:a="dscr_residential",currentPriceDiscount:o=0,currentPropertyType:c="str",equitySource:i="scraped",isUsingEstimatedCapRate:s=!1,numberOfUnits:u=4,priceWasDefaulted:p=!1,windowLocation:d=""}=t;if(p)return null;const l={};if(e.name&&"Property Details"!==e.name&&"Not found"!==e.name&&(l.address=e.name),e.capRate&&"Loading..."!==e.capRate&&"Not found"!==e.capRate){const t=e.capRate.match(/[\d.]+/);if(t){const n=parseFloat(t[0]);e.capRate.includes("%")||n>1?l.capRate=Math.round(n/100*1e6)/1e6:l.capRate=Math.round(1e6*n)/1e6}}if(l.capRateSource=s?"estimated":"scraped",e.contact&&"Not found"!==e.contact&&(l.contact=e.contact),e.listingDate&&"Not found"!==e.listingDate&&(l.dateListed=e.listingDate),e.price&&"Loading..."!==e.price&&"Not found"!==e.price){const t=e.price.match(/[\d,]+/);if(t){const e=parseFloat(t[0].replace(/,/g,""));if(o>0){const t=e/(1-o/100);l.price=Math.round(t)}else l.price=e}}if(void 0!==r&&(l.downPaymentPercent=Math.round(r/100*1e6)/1e6),n&&"Loading..."!==n){const e=n.match(/[\d.]+/);e&&(l.equityPercent=Math.round(parseFloat(e[0])/100*1e6)/1e6)}l.equitySource=i,l.numberOfUnits=u,e.phone&&"Not found"!==e.phone&&(l.phone=e.phone),l.priceDiscountPercent=o>0?Math.round(o/100*1e6)/1e6:0,l.interestRateType=a,l.propertyType=mapPropertyType(c),l.url=d,console.log("exportData",l);const f={};return Object.keys(l).sort().forEach(e=>{f[e]=l[e]}),f}function calculateOriginalPrice(e,t){if(t>0){return e/(1-t/100)}return e}function convertCapRateToDecimal(e){if(!e||"Loading..."===e||"Not found"===e)return null;const t=e.match(/[\d.]+/);if(t){const n=parseFloat(t[0]);return e.includes("%")||n>1?Math.round(n/100*1e6)/1e6:Math.round(1e6*n)/1e6}return null}function formatDownPaymentPercent(e){return Math.round(e/100*1e6)/1e6}export{calculateOriginalPrice,convertCapRateToDecimal,createExportObjectCore,formatDownPaymentPercent,mapPropertyType};
|
|
2
2
|
//# sourceMappingURL=export-logic.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"export-logic.js","sources":["../../src/export/export-logic.js"],"sourcesContent":["// Map the on-screen property type to the dashboard's DB enum. Only \"multifamily\" -> \"mfr\"\r\n// actually differs; the rest pass through. Mirrors property-dashboard/validation/property.js\r\n// mapPropertyType (same table, same unknown -> \"mfr\" default) so the export URL carries the\r\n// real enum instead of relying on the server to convert it.\r\
|
|
1
|
+
{"version":3,"file":"export-logic.js","sources":["../../src/export/export-logic.js"],"sourcesContent":["// Map the on-screen property type to the dashboard's DB enum. Only \"multifamily\" -> \"mfr\"\r\n// actually differs; the rest pass through. Mirrors property-dashboard/validation/property.js\r\n// mapPropertyType (same table, same unknown -> \"mfr\" default) so the export URL carries the\r\n// real enum instead of relying on the server to convert it.\r\nexport function mapPropertyType(type) {\r\n const typeMap = {\r\n assisted: \"assisted\",\r\n business: \"business\",\r\n mixed_use: \"mixed_use\",\r\n multifamily: \"mfr\",\r\n rv_park: \"rv_park\",\r\n str: \"str\",\r\n };\r\n return typeMap[type] || \"mfr\";\r\n}\r\n\r\n// Pure business logic for data export - no DOM, no Chrome APIs.\r\n// Returns null to REFUSE export when the price was defaulted (no real price found):\r\n// a fabricated price would flow into NOI and silently land garbage in the dashboard.\r\nexport function createExportObjectCore(data, options = {}) {\r\n const {\r\n cachedEquity = null,\r\n currentDownPaymentPercent,\r\n currentInterestRateType = \"dscr_residential\",\r\n currentPriceDiscount = 0,\r\n currentPropertyType = \"str\",\r\n equitySource = \"scraped\",\r\n isUsingEstimatedCapRate = false,\r\n numberOfUnits = 4,\r\n priceWasDefaulted = false,\r\n windowLocation = \"\",\r\n } = options;\r\n\r\n if (priceWasDefaulted) return null;\r\n\r\n const exportData = {};\r\n\r\n // 1. Address\r\n if (data.name && data.name !== \"Property Details\" && data.name !== \"Not found\") {\r\n exportData.address = data.name;\r\n }\r\n\r\n // 2. Cap Rate - convert to decimal\r\n if (data.capRate && data.capRate !== \"Loading...\" && data.capRate !== \"Not found\") {\r\n const capMatch = data.capRate.match(/[\\d.]+/);\r\n if (capMatch) {\r\n const numericValue = parseFloat(capMatch[0]);\r\n\r\n // If the original string contains %, it's a percentage that needs conversion\r\n // If it's already a small decimal (< 1), it's likely already in decimal format\r\n if (data.capRate.includes(\"%\") || numericValue > 1) {\r\n // Percentage format - convert to decimal\r\n exportData.capRate = Math.round((numericValue / 100) * 1000000) / 1000000;\r\n } else {\r\n // Already in decimal format - use as-is\r\n exportData.capRate = Math.round(numericValue * 1000000) / 1000000;\r\n }\r\n }\r\n }\r\n\r\n // 3. Cap Rate Source\r\n exportData.capRateSource = isUsingEstimatedCapRate ? \"estimated\" : \"scraped\";\r\n\r\n // 4. Contact name\r\n if (data.contact && data.contact !== \"Not found\") {\r\n exportData.contact = data.contact;\r\n }\r\n\r\n // 5. Date Listed\r\n if (data.listingDate && data.listingDate !== \"Not found\") {\r\n exportData.dateListed = data.listingDate;\r\n }\r\n\r\n // 6. Price - calculate original price if discount applied\r\n if (data.price && data.price !== \"Loading...\" && data.price !== \"Not found\") {\r\n const priceMatch = data.price.match(/[\\d,]+/);\r\n if (priceMatch) {\r\n const displayedPrice = parseFloat(priceMatch[0].replace(/,/g, \"\"));\r\n\r\n if (currentPriceDiscount > 0) {\r\n const discountDecimal = currentPriceDiscount / 100;\r\n const originalPrice = displayedPrice / (1 - discountDecimal);\r\n exportData.price = Math.round(originalPrice);\r\n } else {\r\n exportData.price = displayedPrice;\r\n }\r\n }\r\n }\r\n\r\n // 7. Down Payment Percent (user-controlled value)\r\n if (currentDownPaymentPercent !== undefined) {\r\n exportData.downPaymentPercent = Math.round((currentDownPaymentPercent / 100) * 1000000) / 1000000;\r\n }\r\n\r\n // 8. Equity Percent\r\n if (cachedEquity && cachedEquity !== \"Loading...\") {\r\n const equityMatch = cachedEquity.match(/[\\d.]+/);\r\n if (equityMatch) {\r\n exportData.equityPercent = Math.round((parseFloat(equityMatch[0]) / 100) * 1000000) / 1000000;\r\n }\r\n }\r\n\r\n // 9. Equity Source\r\n exportData.equitySource = equitySource;\r\n\r\n // 10. Number of Units\r\n exportData.numberOfUnits = numberOfUnits;\r\n\r\n // 11. Phone number\r\n if (data.phone && data.phone !== \"Not found\") {\r\n exportData.phone = data.phone;\r\n }\r\n\r\n // 11. Price Discount Percent\r\n if (currentPriceDiscount > 0) {\r\n exportData.priceDiscountPercent = Math.round((currentPriceDiscount / 100) * 1000000) / 1000000;\r\n } else {\r\n exportData.priceDiscountPercent = 0;\r\n }\r\n\r\n // 12. Interest Rate Type\r\n exportData.interestRateType = currentInterestRateType;\r\n\r\n // 13. Property Type - mapped to the DB enum (multifamily -> mfr; rest pass through)\r\n exportData.propertyType = mapPropertyType(currentPropertyType);\r\n\r\n // 13. URL\r\n exportData.url = windowLocation;\r\n\r\n console.log(\"exportData\", exportData);\r\n\r\n // Alphabetize keys\r\n const alphabetized = {};\r\n Object.keys(exportData).sort().forEach(key => {\r\n alphabetized[key] = exportData[key];\r\n });\r\n\r\n return alphabetized;\r\n}\r\n\r\n// Pure calculation functions\r\nexport function calculateOriginalPrice(displayedPrice, discountPercent) {\r\n if (discountPercent > 0) {\r\n const discountDecimal = discountPercent / 100;\r\n return displayedPrice / (1 - discountDecimal);\r\n }\r\n return displayedPrice;\r\n}\r\n\r\nexport function convertCapRateToDecimal(capRateString) {\r\n if (!capRateString || capRateString === \"Loading...\" || capRateString === \"Not found\") {\r\n return null;\r\n }\r\n\r\n const capMatch = capRateString.match(/[\\d.]+/);\r\n if (capMatch) {\r\n const numericValue = parseFloat(capMatch[0]);\r\n\r\n if (capRateString.includes(\"%\") || numericValue > 1) {\r\n return Math.round((numericValue / 100) * 1000000) / 1000000;\r\n } else {\r\n return Math.round(numericValue * 1000000) / 1000000;\r\n }\r\n }\r\n\r\n return null;\r\n}\r\n\r\nexport function formatDownPaymentPercent(percentage) {\r\n return Math.round((percentage / 100) * 1000000) / 1000000;\r\n}\r\n"],"names":["mapPropertyType","type","assisted","business","mixed_use","multifamily","rv_park","str","createExportObjectCore","data","options","cachedEquity","currentDownPaymentPercent","currentInterestRateType","currentPriceDiscount","currentPropertyType","equitySource","isUsingEstimatedCapRate","numberOfUnits","priceWasDefaulted","windowLocation","exportData","name","address","capRate","capMatch","match","numericValue","parseFloat","includes","Math","round","capRateSource","contact","listingDate","dateListed","price","priceMatch","displayedPrice","replace","originalPrice","undefined","downPaymentPercent","equityMatch","equityPercent","phone","priceDiscountPercent","interestRateType","propertyType","url","console","log","alphabetized","Object","keys","sort","forEach","key","calculateOriginalPrice","discountPercent","convertCapRateToDecimal","capRateString","formatDownPaymentPercent","percentage"],"mappings":"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"}
|
package/dist/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export{calculateAppreciatedValue,calculateAssignmentFee,calculateBalloonBalance,calculateCOCR30,calculateCOCRAtPercent,calculateCashFlow,calculateCashFlowYield,calculateCashOutAfterRefi,calculateDiscountFromPrice,calculateNOIByType,calculateNetToBuyer,calculatePMT,calculatePriceForCOCR,calculatePriceFromDiscount,calculateSTRNOI,safePercentage}from"./financial/calculations.js";export{formatCurrency,formatPercentage,formatPriceValue}from"./financial/formatters.js";export{calculateOriginalPrice,convertCapRateToDecimal,createExportObjectCore,formatDownPaymentPercent}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,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}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,calculateCashOutAfterRefi,calculateDiscountFromPrice,calculateNOIByType,calculateNetToBuyer,calculatePMT,calculatePriceForCOCR,calculatePriceFromDiscount,calculateSTRNOI,safePercentage}from"./financial/calculations.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,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}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 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 calculateSTRNOI,\r\n safePercentage,\r\n} from \"./financial/calculations.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} 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 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 calculateSTRNOI,\r\n safePercentage,\r\n} from \"./financial/calculations.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":"y0DA2DY,MAACA,EAAc"}
|