{"_id":"@archerjessop/utilities-etc","_rev":"7-34de8887fa3c94d2d9c6fdeaaf3ae01b","name":"@archerjessop/utilities-etc","dist-tags":{"latest":"9.0.1"},"versions":{"1.0.0":{"name":"@archerjessop/utilities-etc","version":"1.0.0","author":{"name":"Archer Jessop"},"license":"MIT","_id":"@archerjessop/utilities-etc@1.0.0","maintainers":[{"name":"testguest","email":"npmjs.com@applogic.ca"}],"homepage":"https://gitlab.com/archerjessop/dom-utilities#readme","bugs":{"url":"https://gitlab.com/archerjessop/dom-utilities/issues"},"dist":{"shasum":"e1e81a609dcdba5fcb38eb092a9fc02b680906b2","tarball":"https://registry.npmjs.org/@archerjessop/utilities-etc/-/utilities-etc-1.0.0.tgz","fileCount":14,"integrity":"sha512-07NrJpHL5XokJ6wZQi4TX5UJj6gOy0C2HloYcBW5W4Qi/t+xrOnjIdIW1TFFT1MUVqIi4uE+x/zbk3tBiykBcA==","signatures":[{"sig":"MEQCIGpL/KkAJ0J03DWo0QDGe4Isa7GbE9G+qqyRjZNVI+wjAiAEtxFxy4/7JQcpq8lcMINwcFzbJzO25IighL1q6iA4Ow==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":36142},"main":"index.js","gitHead":"5305fb2352c5a8a3ee6e9915b57cf6ffb34755ae","scripts":{"lint":"eslint .","test":"jest","test:dom":"jest tests/dom-utilities/","test:run":"node tests/run-tests.js","test:core":"jest tests/calculations/core.test.js","test:date":"jest tests/calculations/date.test.js","test:watch":"jest --watch","test:verbose":"jest --verbose","release:major":"npm version major && git push && git push --tags && npm publish --access public","release:minor":"npm version minor && git push && git push --tags && npm publish --access public","release:patch":"npm version patch && git push && git push --tags && npm publish --access public","test:business":"jest tests/calculations/business.test.js","test:coverage":"jest --coverage","prepublishOnly":"npm test","test:integration":"jest tests/integration/","test:real-estate":"jest tests/calculations/real-estate.test.js"},"_npmUser":{"name":"testguest","email":"npmjs.com@applogic.ca"},"repository":{"url":"git+https://gitlab.com/archerjessop/dom-utilities.git","type":"git"},"_npmVersion":"9.7.2","description":"Comprehensive set of DOM manipulation, data extraction utilities, and various calculations (financial and otherwise) for our web applications","directories":{},"_nodeVersion":"20.8.1","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^29.5.0","eslint":"^8.40.0","jest-environment-jsdom":"^29.5.0"},"_npmOperationalInternal":{"tmp":"tmp/utilities-etc_1.0.0_1757320635757_0.3891305117427424","host":"s3://npm-registry-packages-npm-production"}},"1.0.1":{"name":"@archerjessop/utilities-etc","version":"1.0.1","author":{"name":"Archer Jessop"},"license":"MIT","_id":"@archerjessop/utilities-etc@1.0.1","maintainers":[{"name":"testguest","email":"npmjs.com@applogic.ca"}],"homepage":"https://gitlab.com/archerjessop/dom-utilities#readme","bugs":{"url":"https://gitlab.com/archerjessop/dom-utilities/issues"},"dist":{"shasum":"9468e46011e4b4a6156a05cb43efcf4cb07efe39","tarball":"https://registry.npmjs.org/@archerjessop/utilities-etc/-/utilities-etc-1.0.1.tgz","fileCount":14,"integrity":"sha512-dts8aby0OSKdWT3kvyq6yyrA8mSmiL+8mruleFLsXos4l5nfzQe79mETSIba9o3fS0urrxbcBaxsAJkr1WU42g==","signatures":[{"sig":"MEQCIDTnA90rEZBd0f2cV94Cj+/kiZB61yt1wbRfdW+vD8GeAiBAW+YKDykrdSFIQyHl4302flN0vEedRiMd7873tBLVAA==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":36144},"main":"index.js","gitHead":"474767e8d185a2aeaf0147b0a8c22659cd977cc6","scripts":{"lint":"eslint .","test":"jest","test:dom":"jest tests/dom-utilities/","test:run":"node tests/run-tests.js","test:core":"jest tests/calculations/core.test.js","test:date":"jest tests/calculations/date.test.js","test:watch":"jest --watch","test:verbose":"jest --verbose","release:major":"npm version major && git push && git push --tags && npm publish --access public","release:minor":"npm version minor && git push && git push --tags && npm publish --access public","release:patch":"npm version patch && git push && git push --tags && npm publish --access public","test:business":"jest tests/calculations/business.test.js","test:coverage":"jest --coverage","prepublishOnly":"npm test","test:integration":"jest tests/integration/","test:real-estate":"jest tests/calculations/real-estate.test.js"},"_npmUser":{"name":"testguest","email":"npmjs.com@applogic.ca"},"repository":{"url":"git+https://gitlab.com/archerjessop/dom-utilities.git","type":"git"},"_npmVersion":"9.7.2","description":"Comprehensive set of DOM manipulation, data extraction utilities, and various calculations (financial and otherwise) for our web applications","directories":{},"_nodeVersion":"20.8.1","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^29.5.0","eslint":"^8.40.0","jest-environment-jsdom":"^29.5.0"},"_npmOperationalInternal":{"tmp":"tmp/utilities-etc_1.0.1_1757344310207_0.39434683327413667","host":"s3://npm-registry-packages-npm-production"}},"2.0.0":{"name":"@archerjessop/utilities-etc","version":"2.0.0","author":{"name":"Archer Jessop"},"license":"MIT","_id":"@archerjessop/utilities-etc@2.0.0","maintainers":[{"name":"testguest","email":"npmjs.com@applogic.ca"}],"homepage":"https://gitlab.com/archerjessop/dom-utilities#readme","bugs":{"url":"https://gitlab.com/archerjessop/dom-utilities/issues"},"dist":{"shasum":"874bc2d7b777354077c5aea60fcc9ec0861d2cfc","tarball":"https://registry.npmjs.org/@archerjessop/utilities-etc/-/utilities-etc-2.0.0.tgz","fileCount":14,"integrity":"sha512-x/L3rgVmA/p9xKGAQ3a0nvIF8E1c99VjTbvqiw9IfVWv8v7j0fV07+v/gdJzwmCmbBwGLWRHjF/sCSM3Inh8ow==","signatures":[{"sig":"MEUCIB1fmfN2Q2lpfh257BVBRfyk/tJAOq/XBCaeAe3qnMbjAiEAr4PUl51b0PKiruo+CLhJXOKm7/sD6GqL1iEsi2EeFh8=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":36117},"main":"index.js","type":"module","gitHead":"8bee5c3198795311c18b1ec227f97dfa9474b422","scripts":{"lint":"eslint .","test":"jest","test:dom":"jest tests/dom-utilities/","test:run":"node tests/run-tests.js","test:core":"jest tests/calculations/core.test.js","test:date":"jest tests/calculations/date.test.js","test:watch":"jest --watch","test:verbose":"jest --verbose","release:major":"npm version major && git push && git push --tags && npm publish --access public","release:minor":"npm version minor && git push && git push --tags && npm publish --access public","release:patch":"npm version patch && git push && git push --tags && npm publish --access public","test:business":"jest tests/calculations/business.test.js","test:coverage":"jest --coverage","prepublishOnly":"npm test","test:integration":"jest tests/integration/","test:real-estate":"jest tests/calculations/real-estate.test.js"},"_npmUser":{"name":"testguest","email":"npmjs.com@applogic.ca"},"repository":{"url":"git+https://gitlab.com/archerjessop/dom-utilities.git","type":"git"},"_npmVersion":"10.8.2","description":"Comprehensive set of DOM manipulation, data extraction utilities, and various calculations (financial and otherwise) for our web applications","directories":{},"_nodeVersion":"22.8.0","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^29.7.0","eslint":"^9.10.0","babel-jest":"^29.7.0","@babel/core":"^7.26.0","@babel/preset-env":"^7.26.0","jest-environment-jsdom":"^29.7.0"},"_npmOperationalInternal":{"tmp":"tmp/utilities-etc_2.0.0_1757355872126_0.8293566033837287","host":"s3://npm-registry-packages-npm-production"}},"2.0.1":{"name":"@archerjessop/utilities-etc","version":"2.0.1","author":{"name":"Archer Jessop"},"license":"MIT","_id":"@archerjessop/utilities-etc@2.0.1","maintainers":[{"name":"testguest","email":"npmjs.com@applogic.ca"}],"homepage":"https://gitlab.com/archerjessop/dom-utilities#readme","bugs":{"url":"https://gitlab.com/archerjessop/dom-utilities/issues"},"dist":{"shasum":"d94e4b92d91826c4c45c014a6a323c55d1389fe2","tarball":"https://registry.npmjs.org/@archerjessop/utilities-etc/-/utilities-etc-2.0.1.tgz","fileCount":14,"integrity":"sha512-HutM3aP/XStm87F5J2rT85UjpYnfxd9swSgLgKQGbNNxPb4PasUfFtD+sjPMWQpPdMh6nrDtRt5wrb+5Xrxmag==","signatures":[{"sig":"MEUCIHG2g3nQlAipWW3aPZHq8bWTzVVrC3gwn7SOYp+Wcvq9AiEA+el40t9uFEza+Xl3lO6O4648zzcRz10HojO3oHonCLQ=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":36117},"main":"index.js","type":"module","gitHead":"e47bc6dbd0b6e033047b6fa553e5e42b12f221af","scripts":{"lint":"eslint .","test":"jest","test:dom":"jest tests/dom-utilities/","test:run":"node tests/run-tests.js","test:core":"jest tests/calculations/core.test.js","test:date":"jest tests/calculations/date.test.js","test:watch":"jest --watch","test:verbose":"jest --verbose","release:major":"npm version major && git push && git push --tags && npm publish --access public","release:minor":"npm version minor && git push && git push --tags && npm publish --access public","release:patch":"npm version patch && git push && git push --tags && npm publish --access public","test:business":"jest tests/calculations/business.test.js","test:coverage":"jest --coverage","prepublishOnly":"npm test","test:integration":"jest tests/integration/","test:real-estate":"jest tests/calculations/real-estate.test.js"},"_npmUser":{"name":"testguest","email":"npmjs.com@applogic.ca"},"repository":{"url":"git+https://gitlab.com/archerjessop/dom-utilities.git","type":"git"},"_npmVersion":"10.8.2","description":"Comprehensive set of DOM manipulation, data extraction utilities, and various calculations (financial and otherwise) for our web applications","directories":{},"_nodeVersion":"22.8.0","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^29.7.0","eslint":"^9.10.0","babel-jest":"^29.7.0","@babel/core":"^7.26.0","@babel/preset-env":"^7.26.0","jest-environment-jsdom":"^29.7.0"},"_npmOperationalInternal":{"tmp":"tmp/utilities-etc_2.0.1_1757361744184_0.29373279478149117","host":"s3://npm-registry-packages-npm-production"}},"8.0.0":{"name":"@archerjessop/utilities-etc","version":"8.0.0","author":{"name":"Archer Jessop"},"license":"MIT","_id":"@archerjessop/utilities-etc@8.0.0","maintainers":[{"name":"testguest","email":"npmjs.com@applogic.ca"}],"homepage":"https://gitlab.com/archerjessop/dom-utilities#readme","bugs":{"url":"https://gitlab.com/archerjessop/dom-utilities/issues"},"dist":{"shasum":"53580be9b509d038912c0cebc774474fd709ebd5","tarball":"https://registry.npmjs.org/@archerjessop/utilities-etc/-/utilities-etc-8.0.0.tgz","fileCount":15,"integrity":"sha512-cMk9pSWO1RpEiUZrWpWCQ92LkyTH458cH8YhHW6PC3+u4WPntHcvfFgOmHUlphnOEjCUOr33ebyn72mnSepGaA==","signatures":[{"sig":"MEUCIQDJiOZKK5vLVE69bRNiV0cZUW8f8JXTWOG4OWZ83ipnzAIgKgQ+3IROtEmBfcHqGhP28rXY4Q5bukOPdToHkjXUnos=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":47275},"main":"index.js","type":"module","gitHead":"808b94ad585df6750f77649ab01dd8617430fe2f","scripts":{"lint":"eslint .","test":"jest","test:dom":"jest tests/dom-utilities/","test:run":"node tests/run-tests.js","test:core":"jest tests/calculations/core.test.js","test:date":"jest tests/calculations/date.test.js","test:watch":"jest --watch","test:verbose":"jest --verbose","release:major":"npm version major && git push && git push --tags && npm publish --access public","release:minor":"npm version minor && git push && git push --tags && npm publish --access public","release:patch":"npm version patch && git push && git push --tags && npm publish --access public","test:business":"jest tests/calculations/business.test.js","test:coverage":"jest --coverage","prepublishOnly":"npm test","test:integration":"jest tests/integration/","test:real-estate":"jest tests/calculations/real-estate.test.js"},"_npmUser":{"name":"testguest","email":"npmjs.com@applogic.ca"},"repository":{"url":"git+https://gitlab.com/archerjessop/dom-utilities.git","type":"git"},"_npmVersion":"10.8.2","description":"Comprehensive set of DOM manipulation, data extraction utilities, and various calculations (financial and otherwise) for our web applications","directories":{},"_nodeVersion":"22.8.0","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^29.7.0","eslint":"^9.10.0","babel-jest":"^29.7.0","@babel/core":"^7.26.0","@babel/preset-env":"^7.26.0","jest-environment-jsdom":"^29.7.0"},"_npmOperationalInternal":{"tmp":"tmp/utilities-etc_8.0.0_1757393215111_0.3551769221129346","host":"s3://npm-registry-packages-npm-production"}},"9.0.0":{"name":"@archerjessop/utilities-etc","version":"9.0.0","author":{"name":"Archer Jessop"},"license":"MIT","_id":"@archerjessop/utilities-etc@9.0.0","maintainers":[{"name":"testguest","email":"npmjs.com@applogic.ca"}],"homepage":"https://gitlab.com/archerjessop/dom-utilities#readme","bugs":{"url":"https://gitlab.com/archerjessop/dom-utilities/issues"},"dist":{"shasum":"d2f5f64e37e0b4194a5423f66fa73aacf8a41a43","tarball":"https://registry.npmjs.org/@archerjessop/utilities-etc/-/utilities-etc-9.0.0.tgz","fileCount":16,"integrity":"sha512-o3vaxsCDa4a2oNom7LRe81P1UJmLYNrcotmfUty5FBQ2fSUteoH3j0ddqy/x2HYebICiibc02aSALhnHEZgweA==","signatures":[{"sig":"MEUCIA5Rvku3w4GAU6zfnRNj4+kJFHRX+kjvyFPalrcOkSq2AiEA/Wae7kDzoAXCdmUDSN5vtWytN8FJJwvM8Yx5MdCZTnQ=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":49077},"main":"index.js","type":"module","gitHead":"8b62ca7d62c628ff151a481b9b791ae657b224d4","scripts":{"lint":"eslint .","test":"jest","test:dom":"jest tests/dom-utilities/","test:run":"node tests/run-tests.js","test:core":"jest tests/calculations/core.test.js","test:date":"jest tests/calculations/date.test.js","test:watch":"jest --watch","test:verbose":"jest --verbose","release:major":"npm version major && git push && git push --tags && npm publish --access public","release:minor":"npm version minor && git push && git push --tags && npm publish --access public","release:patch":"npm version patch && git push && git push --tags && npm publish --access public","test:business":"jest tests/calculations/business.test.js","test:coverage":"jest --coverage","prepublishOnly":"npm test","test:integration":"jest tests/integration/","test:real-estate":"jest tests/calculations/real-estate.test.js"},"_npmUser":{"name":"testguest","email":"npmjs.com@applogic.ca"},"repository":{"url":"git+https://gitlab.com/archerjessop/dom-utilities.git","type":"git"},"_npmVersion":"10.8.2","description":"Comprehensive set of DOM manipulation, data extraction utilities, and various calculations (financial and otherwise) for our web applications","directories":{},"_nodeVersion":"22.8.0","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^29.7.0","eslint":"^9.10.0","babel-jest":"^29.7.0","@babel/core":"^7.26.0","@babel/preset-env":"^7.26.0","jest-environment-jsdom":"^29.7.0"},"_npmOperationalInternal":{"tmp":"tmp/utilities-etc_9.0.0_1757393622018_0.4281550078270766","host":"s3://npm-registry-packages-npm-production"}},"9.0.1":{"name":"@archerjessop/utilities-etc","version":"9.0.1","type":"module","description":"Comprehensive set of DOM manipulation, data extraction utilities, and various calculations (financial and otherwise) for our web applications","publishConfig":{"access":"public"},"main":"index.js","scripts":{"test":"jest","test:watch":"jest --watch","test:coverage":"jest --coverage","test:verbose":"jest --verbose","test:business":"jest tests/calculations/business.test.js","test:core":"jest tests/calculations/core.test.js","test:date":"jest tests/calculations/date.test.js","test:real-estate":"jest tests/calculations/real-estate.test.js","test:dom":"jest tests/dom-utilities/","test:integration":"jest tests/integration/","test:run":"node tests/run-tests.js","lint":"eslint .","prepublishOnly":"npm test","release:patch":"npm version patch && git push && git push --tags && npm publish --access public","release:minor":"npm version minor && git push && git push --tags && npm publish --access public","release:major":"npm version major && git push && git push --tags && npm publish --access public"},"author":{"name":"Archer Jessop"},"license":"MIT","devDependencies":{"@babel/core":"^7.26.0","@babel/preset-env":"^7.26.0","babel-jest":"^29.7.0","eslint":"^9.10.0","jest":"^29.7.0","jest-environment-jsdom":"^29.7.0"},"repository":{"type":"git","url":"git+https://gitlab.com/archerjessop/dom-utilities.git"},"_id":"@archerjessop/utilities-etc@9.0.1","gitHead":"4d2e9ce784e1f7b57659edf0d975c137ab16aaf7","bugs":{"url":"https://gitlab.com/archerjessop/dom-utilities/issues"},"homepage":"https://gitlab.com/archerjessop/dom-utilities#readme","_nodeVersion":"22.8.0","_npmVersion":"10.8.2","dist":{"integrity":"sha512-LXLEzVW1C610Kbts6DZ8F8V3AoGh+9qf8vIDKo+HvSD+VyVY5cayjeX/IHR4NKO5zHNKqoqZVRObT8vnFnVzkw==","shasum":"680dc6d2fd15d196e7a315b966c4fa6bbcb4a824","tarball":"https://registry.npmjs.org/@archerjessop/utilities-etc/-/utilities-etc-9.0.1.tgz","fileCount":16,"unpackedSize":49898,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEQCIHYwjoeYW7q3IYERubRWDciAnB0k6AkA4kHBT/zkQNGjAiAA50v77v0WPXmnypFtQmE7howM8tBJx73BupPlwDuquQ=="}]},"_npmUser":{"name":"testguest","email":"npmjs.com@applogic.ca"},"directories":{},"maintainers":[{"name":"testguest","email":"npmjs.com@applogic.ca"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/utilities-etc_9.0.1_1757395761508_0.4623155364842202"},"_hasShrinkwrap":false}},"time":{"created":"2025-09-08T08:37:15.647Z","modified":"2025-09-09T05:29:21.912Z","1.0.0":"2025-09-08T08:37:15.935Z","1.0.1":"2025-09-08T15:11:50.402Z","2.0.0":"2025-09-08T18:24:32.326Z","2.0.1":"2025-09-08T20:02:24.434Z","8.0.0":"2025-09-09T04:46:55.284Z","9.0.0":"2025-09-09T04:53:42.207Z","9.0.1":"2025-09-09T05:29:21.705Z"},"bugs":{"url":"https://gitlab.com/archerjessop/dom-utilities/issues"},"author":{"name":"Archer Jessop"},"license":"MIT","homepage":"https://gitlab.com/archerjessop/dom-utilities#readme","repository":{"type":"git","url":"git+https://gitlab.com/archerjessop/dom-utilities.git"},"description":"Comprehensive set of DOM manipulation, data extraction utilities, and various calculations (financial and otherwise) for our web applications","maintainers":[{"name":"testguest","email":"npmjs.com@applogic.ca"}],"readme":"# @archerjessop/utilities-etc\r\n\r\nComprehensive set of DOM manipulation, data extraction utilities, and various calculations (financial and otherwise) for our web applications.\r\n\r\n## Updating\r\n\r\nMake your changes then, depending on the changes:\r\n\r\nFor bug fixes (backward compatible):\r\n\r\n```bash\r\nnpm run release:patch\r\n```\r\n→ bumps 1.0.0 → 1.0.1\r\n\r\nFor new features (still backward compatible):\r\n```bash\r\nnpm run release:minor\r\n```\r\n→ bumps 1.0.0 → 1.1.0\r\n\r\nFor breaking changes:\r\n```bash\r\nnpm run release:major\r\n```\r\n→ bumps 1.0.0 → 2.0.0\r\n\r\nEach script will:\r\n- Update package.json version\r\n- Commit the version bump + create a git tag\r\n- Push commit + tag to your repo\r\n- Publish the new version to npm\r\n\r\n## Installation\r\n\r\n```bash\r\nnpm install @archerjessop/utilities-etc\r\n```\r\n\r\n## Usage\r\n\r\n```javascript\r\nconst {\r\n  calculateDOM,\r\n  extractPhoneNumber,\r\n  extractBedrooms,\r\n  validatePhoneNumber,\r\n  calculatePMT,\r\n  formatCurrency\r\n} = require(\"@archerjessop/utilities-etc\");\r\n\r\n// Calculate days on market\r\nconst dom = calculateDOM(\"01/15/2024\");\r\nconsole.log(dom); // \"59 (01/15/2024)\"\r\n\r\n// Extract phone number from text\r\nconst phone = extractPhoneNumber(\"Call us at (555) 123-4567\");\r\nconsole.log(phone); // \"(555) 123-4567\"\r\n\r\n// Calculate loan payment\r\nconst payment = calculatePMT(300000, 0.075, 30);\r\nconsole.log(formatCurrency(payment, true)); // \"$2,097\"\r\n```\r\n\r\n## Comprehensive API Reference\r\n\r\n### Business Calculations\r\n\r\n#### `calculateCompoundGrowth(initialValue, growthRate, periods)`\r\nCalculate compound growth over time\r\n- **Input**: Initial value (number), growth rate (decimal), number of periods (number)\r\n- **Output**: Future value (number)\r\n\r\n#### `calculateCurrentRatio(currentAssets, currentLiabilities)`\r\nCalculate current ratio for liquidity analysis\r\n- **Input**: Current assets (number), current liabilities (number)\r\n- **Output**: Current ratio (number)\r\n\r\n#### `calculateNPV(cashFlows, discountRate, initialInvestment)`\r\nCalculate Net Present Value of cash flows\r\n- **Input**: Cash flows array (number[]), discount rate (decimal), initial investment (number, optional)\r\n- **Output**: Net present value (number)\r\n\r\n#### `calculatePresentValue(futureValue, discountRate, periods)`\r\nCalculate present value of future amount\r\n- **Input**: Future value (number), discount rate (decimal), number of periods (number)\r\n- **Output**: Present value (number)\r\n\r\n#### `calculateROE(netIncome, shareholderEquity)`\r\nCalculate Return on Equity\r\n- **Input**: Net income (number), shareholder equity (number)\r\n- **Output**: ROE as decimal (number)\r\n\r\n#### `calculateROI(gain, cost)`\r\nCalculate Return on Investment\r\n- **Input**: Gain from investment (number), cost of investment (number)\r\n- **Output**: ROI as decimal (number)\r\n\r\n### Core Utilities\r\n\r\n#### `calculateInterestOverTime(principal, annualRate, years)`\r\nCalculate total interest paid over loan life\r\n- **Input**: Principal amount (number), annual rate (decimal), years (number)\r\n- **Output**: Total interest (number)\r\n\r\n#### `calculatePMT(principal, annualRate, years)`\r\nCalculate monthly loan payment (PMT function)\r\n- **Input**: Principal amount (number), annual rate (decimal), years (number)\r\n- **Output**: Monthly payment (number)\r\n\r\n#### `calculateRemainingBalance(principal, annualRate, totalYears, yearsPaid)`\r\nCalculate remaining loan balance after payments\r\n- **Input**: Principal (number), annual rate (decimal), total years (number), years paid (number)\r\n- **Output**: Remaining balance (number)\r\n\r\n#### `calculateBalloonBalance(principal, annualRate, totalYears, yearsPaid)`\r\nAlias for calculateRemainingBalance - calculate balloon payment amount\r\n- **Input**: Principal (number), annual rate (decimal), total years (number), years paid (number)\r\n- **Output**: Balloon balance (number)\r\n\r\n#### `formatCurrency(amount, isMonthly)`\r\nFormat currency with K/M notation or full amount for monthly payments\r\n- **Input**: Amount (number), is monthly flag (boolean, optional)\r\n- **Output**: Formatted currency string (string)\r\n\r\n#### `formatNumber(value, decimals)`\r\nFormat number with commas and specified decimal places\r\n- **Input**: Value (number), decimal places (number, default 2)\r\n- **Output**: Formatted number string (string)\r\n\r\n#### `formatPercentage(value, decimals)`\r\nFormat decimal as percentage\r\n- **Input**: Decimal value (number), decimal places (number, default 1)\r\n- **Output**: Formatted percentage string (string)\r\n\r\n#### `formatPriceValue(price)`\r\nFormat price with K/M notation for display\r\n- **Input**: Price value (number)\r\n- **Output**: Formatted price string (string)\r\n\r\n### Date Utilities\r\n\r\n#### `calculateDOM(dateString)`\r\nCalculate days on market from listing date\r\n- **Input**: Date string in various formats (string)\r\n- **Output**: Formatted DOM string with days and original date (string)\r\n\r\n#### `calculateTimeDifference(startDate, endDate)`\r\nCalculate time difference between two dates\r\n- **Input**: Start date (string|Date), end date (string|Date, optional - defaults to now)\r\n- **Output**: Object with days, hours, minutes, and formatted string (object)\r\n\r\n### DOM/Text Extraction\r\n\r\n#### `extractBedrooms(text)`\r\nExtract bedroom count from text or DOM\r\n- **Input**: Text to search (string, optional - uses document.body if not provided)\r\n- **Output**: Number of bedrooms or default value (number)\r\n\r\n#### `extractEmail(text)`\r\nExtract email addresses from text or DOM\r\n- **Input**: Text to search (string, optional - uses document.body if not provided)\r\n- **Output**: Array of email addresses found (string[])\r\n\r\n#### `extractPhoneNumber(text)`\r\nExtract phone number from text or DOM\r\n- **Input**: Text to search (string, optional - uses document.body if not provided)\r\n- **Output**: Phone number or \"Not found\" (string)\r\n\r\n#### `extractPrice(text)`\r\nExtract price values from text or DOM\r\n- **Input**: Text to search (string, optional - uses document.body if not provided)\r\n- **Output**: Array of price values found (number[])\r\n\r\n### Real Estate Calculations\r\n\r\n#### `calculateAppreciation(currentPrice, appreciationRate, years, balloonBalance, dscrBalance, refiPercent)`\r\nCalculate property appreciation scenarios with refinance analysis\r\n- **Input**: Current price (number), appreciation rate (decimal), years (number), balloon balance (number, optional), DSCR balance (number, optional), refi percentage (decimal, optional)\r\n- **Output**: Object with future value, refi amount, total owing, cash out (object)\r\n\r\n#### `calculateCapRate(annualNOI, propertyPrice)`\r\nCalculate capitalization rate\r\n- **Input**: Annual NOI (number), property price (number)\r\n- **Output**: Cap rate as decimal (number)\r\n\r\n#### `calculateCashFlow(monthlyNOI, loanAmount, interestRate, amortizationYears)`\r\nCalculate monthly cash flow after debt service\r\n- **Input**: Monthly NOI (number), loan amount (number), interest rate (decimal), amortization years (number)\r\n- **Output**: Monthly cash flow (number)\r\n\r\n#### `calculateCashFlowYield(annualCashFlow, propertyPrice)`\r\nCalculate cash flow yield as percentage of property price\r\n- **Input**: Annual cash flow (number), property price (number)\r\n- **Output**: Cash flow yield as decimal (number)\r\n\r\n#### `calculateCOCR(annualCashFlow, downPayment)`\r\nCalculate Cash-on-Cash Return\r\n- **Input**: Annual cash flow (number), down payment amount (number)\r\n- **Output**: COCR as decimal (number)\r\n\r\n#### `calculateCOCR15(propertyPrice, annualNOI, interestRate, amortizationYears)`\r\nCalculate COCR for 15% down payment scenario\r\n- **Input**: Property price (number), annual NOI (number), interest rate (decimal, default 0.075), amortization years (number, default 30)\r\n- **Output**: COCR as decimal (number)\r\n\r\n#### `calculateCOCR30(propertyPrice, annualNOI, interestRate, amortizationYears)`\r\nCalculate COCR for 30% down payment scenario\r\n- **Input**: Property price (number), annual NOI (number), interest rate (decimal, default 0.075), amortization years (number, default 30)\r\n- **Output**: COCR as decimal (number)\r\n\r\n#### `calculateCOCRScenario(propertyPrice, annualNOI, downPaymentPercent, interestRate, amortizationYears)`\r\nCalculate COCR for custom down payment scenario\r\n- **Input**: Property price (number), annual NOI (number), down payment percent (decimal), interest rate (decimal, default 0.075), amortization years (number, default 30)\r\n- **Output**: COCR as decimal (number)\r\n\r\n#### `calculateNetToBuyer(propertyPrice, downPaymentPercent, constants)`\r\nCalculate net amount buyer needs with all costs\r\n- **Input**: Property price (number), down payment percent (decimal), constants object (object, optional)\r\n- **Output**: Object with cost breakdown and net to buyer (object)\r\n\r\n### Validation\r\n\r\n#### `validateDate(dateString)`\r\nValidate if string is a valid date\r\n- **Input**: Date string (string)\r\n- **Output**: True if valid date (boolean)\r\n\r\n#### `validateEmail(email)`\r\nValidate email address format\r\n- **Input**: Email address (string)\r\n- **Output**: True if valid email format (boolean)\r\n\r\n#### `validatePhoneNumber(phoneNumber)`\r\nValidate phone number format\r\n- **Input**: Phone number (string)\r\n- **Output**: True if valid phone number format (boolean)\r\n\r\n## Browser Support\r\n\r\nWorks in both Node.js and browser environments. In browser environments, functions can extract data directly from the DOM when no text parameter is provided.\r\n\r\n## License\r\n\r\nMIT","readmeFilename":"README.md"}