diff --git a/cfgov/unprocessed/apps/owning-a-home/npm-packages-offline-cache/format-usd-1.0.1.tgz b/cfgov/unprocessed/apps/owning-a-home/npm-packages-offline-cache/format-usd-1.0.1.tgz deleted file mode 100644 index 669df8946ad..00000000000 Binary files a/cfgov/unprocessed/apps/owning-a-home/npm-packages-offline-cache/format-usd-1.0.1.tgz and /dev/null differ diff --git a/cfgov/unprocessed/apps/owning-a-home/npm-packages-offline-cache/unformat-usd-0.1.1.tgz b/cfgov/unprocessed/apps/owning-a-home/npm-packages-offline-cache/unformat-usd-0.1.1.tgz deleted file mode 100644 index cad49096925..00000000000 Binary files a/cfgov/unprocessed/apps/owning-a-home/npm-packages-offline-cache/unformat-usd-0.1.1.tgz and /dev/null differ diff --git a/cfgov/unprocessed/apps/owning-a-home/package.json b/cfgov/unprocessed/apps/owning-a-home/package.json index 0e50fae41ab..c5bb5076abd 100644 --- a/cfgov/unprocessed/apps/owning-a-home/package.json +++ b/cfgov/unprocessed/apps/owning-a-home/package.json @@ -14,13 +14,11 @@ "license": "SEE LICENSE IN TERMS.md", "dependencies": { "amortize": "1.1.0", - "format-usd": "1.0.1", "highcharts": "7.2.2", "jquery": "3.6.0", "jumbo-mortgage": "3.0.0", "median": "0.0.2", - "rangeslider-js": "^3.0.2", - "unformat-usd": "0.1.1" + "rangeslider-js": "^3.0.2" }, "type": "module" } diff --git a/cfgov/unprocessed/apps/owning-a-home/yarn.lock b/cfgov/unprocessed/apps/owning-a-home/yarn.lock index a000ed972b4..79dd5b05920 100644 --- a/cfgov/unprocessed/apps/owning-a-home/yarn.lock +++ b/cfgov/unprocessed/apps/owning-a-home/yarn.lock @@ -17,11 +17,6 @@ ev-pos@^1.0.1: resolved "https://registry.yarnpkg.com/ev-pos/-/ev-pos-1.0.1.tgz#8bd7726667dfc3322f7f33e12bfd8a79658f66d0" integrity sha512-XgzFXHBcgOQ92hDQLT2tjB+jC6tcfiUOn0FdfcwFkq1/5LeYY3ql163ADVpj8e8LKAU5oUo9ro1gq1cXnO8eOA== -format-usd@1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/format-usd/-/format-usd-1.0.1.tgz#b5f80cf8d9eab5cf5f94135aa7cee272be5d705c" - integrity sha512-tFCdsZS3MNvrCCEHp7pk98NWOzOOYTzyCdoMNOuwvbtTOCK0g9y178G9LU+YWR5ROtw0MrIB3gjHOJEYC4UeZg== - format-usd@~0.1.0: version "0.1.0" resolved "https://registry.yarnpkg.com/format-usd/-/format-usd-0.1.0.tgz#6ff5475a4ddceb6fc5d3d2f93fedd70e2670ad3e" @@ -56,8 +51,3 @@ rangeslider-js@^3.0.2: dependencies: custom-event "^1.0.1" ev-pos "^1.0.1" - -unformat-usd@0.1.1: - version "0.1.1" - resolved "https://registry.yarnpkg.com/unformat-usd/-/unformat-usd-0.1.1.tgz#f9b50e9c5b0a178de1738b4de55537ebd00ab8f7" - integrity sha512-dliIiVhz3dGCEIY1tcHctuv1tZIfU4s4a8s3YFWkoyzjEF2mTbQGbGdqbBi7C3OLI5uh4cSa5bEtnpKltC5f+w== diff --git a/cfgov/unprocessed/apps/paying-for-college/js/college-costs/views/chart-view.js b/cfgov/unprocessed/apps/paying-for-college/js/college-costs/views/chart-view.js index 34918d54442..4c746999e5a 100644 --- a/cfgov/unprocessed/apps/paying-for-college/js/college-costs/views/chart-view.js +++ b/cfgov/unprocessed/apps/paying-for-college/js/college-costs/views/chart-view.js @@ -8,7 +8,7 @@ import { import Highcharts from 'highcharts/highstock'; import accessibility from 'highcharts/modules/accessibility'; import more from 'highcharts/highcharts-more'; -import numberToMoney from 'format-usd'; +import { formatUSD } from '../../../../../js/modules/util/format.js'; import patternFill from 'highcharts/modules/pattern-fill'; import { updateState } from '../dispatchers/update-state.js'; @@ -596,12 +596,12 @@ const chartView = { updateCostOfBorrowingChart: () => { const totalBorrowingAtGrad = getFinancialValue('debt_totalAtGrad'); - const borrowedString = numberToMoney({ + const borrowedString = formatUSD({ amount: totalBorrowingAtGrad, decimalPlaces: 0, }); const interest10years = getFinancialValue('debt_tenYearInterest'); - const interestString = numberToMoney({ + const interestString = formatUSD({ amount: interest10years, decimalPlaces: 0, }); @@ -625,7 +625,7 @@ const chartView = { const max = Math.max(totalCosts * 1.1, totalFunding * 1.1); const text = 'Your costs
' + - numberToMoney({ + formatUSD({ amount: totalCosts, decimalPlaces: 0, }); @@ -653,9 +653,9 @@ const chartView = { updateMaxDebtChart: () => { const totalDebt = getFinancialValue('debt_totalAtGrad'); - const debtString = numberToMoney({ amount: totalDebt, decimalPlaces: 0 }); + const debtString = formatUSD({ amount: totalDebt, decimalPlaces: 0 }); const salary = getFinancialValue('salary_annual'); - const salaryString = numberToMoney({ amount: salary, decimalPlaces: 0 }); + const salaryString = formatUSD({ amount: salary, decimalPlaces: 0 }); const max = Math.max(totalDebt * 1.1, salary * 1.1); chartView.maxDebtChart.yAxis[0].update({ @@ -703,17 +703,17 @@ const chartView = { updateAffordingChart: () => { const monthlyExpenses = getExpensesValue('total_expenses'); - const expensesString = numberToMoney({ + const expensesString = formatUSD({ amount: monthlyExpenses, decimalPlaces: 0, }); const monthlyPayment = getFinancialValue('debt_tenYearMonthly'); - const paymentString = numberToMoney({ + const paymentString = formatUSD({ amount: monthlyPayment, decimalPlaces: 0, }); const monthlySalary = getFinancialValue('salary_monthly'); - const salaryString = numberToMoney({ + const salaryString = formatUSD({ amount: monthlySalary, decimalPlaces: 0, }); diff --git a/cfgov/unprocessed/apps/paying-for-college/js/college-costs/views/expenses-view.js b/cfgov/unprocessed/apps/paying-for-college/js/college-costs/views/expenses-view.js index 279675c6419..30c233502bd 100644 --- a/cfgov/unprocessed/apps/paying-for-college/js/college-costs/views/expenses-view.js +++ b/cfgov/unprocessed/apps/paying-for-college/js/college-costs/views/expenses-view.js @@ -1,7 +1,7 @@ // This file contains the 'view' of expenses budget after graduation import { updateExpense, updateRegion } from '../dispatchers/update-models.js'; import { getExpensesValue } from '../dispatchers/get-model-values.js'; -import numberToMoney from 'format-usd'; +import { formatUSD } from '../../../../../js/modules/util/format.js'; import { selectorMatches } from '../util/other-utils.js'; import { convertStringToNumber } from '../../../../../js/modules/util/format.js'; import { @@ -40,7 +40,7 @@ const expensesView = { if (!selectorMatches(elem, ':focus')) { const prop = elem.dataset.expensesItem; let val = getExpensesValue(prop); - val = numberToMoney({ amount: val, decimalPlaces: 0 }); + val = formatUSD({ amount: val, decimalPlaces: 0 }); if (elem.tagName === 'INPUT') { elem.value = val; diff --git a/cfgov/unprocessed/apps/paying-for-college/js/college-costs/views/financial-view.js b/cfgov/unprocessed/apps/paying-for-college/js/college-costs/views/financial-view.js index 6f3f0acd6d5..11d3c835b16 100644 --- a/cfgov/unprocessed/apps/paying-for-college/js/college-costs/views/financial-view.js +++ b/cfgov/unprocessed/apps/paying-for-college/js/college-costs/views/financial-view.js @@ -11,7 +11,7 @@ import { updateFinancial, updateFinancialsFromSchool, } from '../dispatchers/update-models.js'; -import numberToMoney from 'format-usd'; +import { formatUSD } from '../../../../../js/modules/util/format.js'; import { selectorMatches } from '../util/other-utils.js'; import { updateState } from '../dispatchers/update-state.js'; import { updateUrlQueryString } from '../dispatchers/update-view.js'; @@ -65,7 +65,7 @@ const financialView = { } else if (isHours) { val = Math.round(val * 10) / 10 + ' hours'; } else { - val = numberToMoney({ amount: val, decimalPlaces: 0 }); + val = formatUSD({ amount: val, decimalPlaces: 0 }); } if (elem.tagName === 'INPUT') { diff --git a/cfgov/unprocessed/apps/paying-for-college/npm-packages-offline-cache/format-usd-1.0.1.tgz b/cfgov/unprocessed/apps/paying-for-college/npm-packages-offline-cache/format-usd-1.0.1.tgz deleted file mode 100644 index 669df8946ad..00000000000 Binary files a/cfgov/unprocessed/apps/paying-for-college/npm-packages-offline-cache/format-usd-1.0.1.tgz and /dev/null differ diff --git a/cfgov/unprocessed/apps/paying-for-college/package.json b/cfgov/unprocessed/apps/paying-for-college/package.json index 8741719d9b4..095627a3278 100644 --- a/cfgov/unprocessed/apps/paying-for-college/package.json +++ b/cfgov/unprocessed/apps/paying-for-college/package.json @@ -15,7 +15,6 @@ "license": "SEE LICENSE IN TERMS.md", "dependencies": { "@cfpb/student-debt-calculator": "3.0.2", - "format-usd": "1.0.1", "jquery": "3.6.1" }, "type": "module" diff --git a/cfgov/unprocessed/apps/paying-for-college/yarn.lock b/cfgov/unprocessed/apps/paying-for-college/yarn.lock index 309431a39c2..9bb42fd49b1 100644 --- a/cfgov/unprocessed/apps/paying-for-college/yarn.lock +++ b/cfgov/unprocessed/apps/paying-for-college/yarn.lock @@ -7,11 +7,6 @@ resolved "https://registry.yarnpkg.com/@cfpb/student-debt-calculator/-/student-debt-calculator-3.0.2.tgz#cdc1b048efde249851ecf5df8b5e437949b50012" integrity sha512-4e68GvtW+SpbwbBHrNXl1ZXppys2304M7RVzpCM3K6O6dUDxSs2yQgYH95Fh/i1d2DZQQCvu7e/gHq96bRgwMw== -format-usd@1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/format-usd/-/format-usd-1.0.1.tgz#b5f80cf8d9eab5cf5f94135aa7cee272be5d705c" - integrity sha512-tFCdsZS3MNvrCCEHp7pk98NWOzOOYTzyCdoMNOuwvbtTOCK0g9y178G9LU+YWR5ROtw0MrIB3gjHOJEYC4UeZg== - jquery@3.6.1: version "3.6.1" resolved "https://registry.yarnpkg.com/jquery/-/jquery-3.6.1.tgz#fab0408f8b45fc19f956205773b62b292c147a16" diff --git a/cfgov/unprocessed/root/code.json b/cfgov/unprocessed/root/code.json index fef97430f67..bd92925e946 100644 --- a/cfgov/unprocessed/root/code.json +++ b/cfgov/unprocessed/root/code.json @@ -1190,66 +1190,6 @@ "email": "tech@consumerfinance.gov" } }, - { - "name": "format-usd", - "description": "Convert a number or string to a USD-formatted string", - "repositoryURL": "https://github.com/cfpb/format-usd", - "permissions": { - "licenses": [ - { - "name": "Public Domain" - } - ], - "usageType": "openSource" - }, - "laborHours": -1, - "tags": [ - "cfpb" - ], - "contact": { - "email": "tech@consumerfinance.gov" - } - }, - { - "name": "unformat-usd", - "description": "Convert a United States dollar-formatted string into a number.", - "repositoryURL": "https://github.com/cfpb/unformat-usd", - "permissions": { - "licenses": [ - { - "name": "Public Domain" - } - ], - "usageType": "openSource" - }, - "laborHours": -1, - "tags": [ - "cfpb" - ], - "contact": { - "email": "tech@consumerfinance.gov" - } - }, - { - "name": "is-money-usd", - "description": "A node module to test for a USD formatted input.", - "repositoryURL": "https://github.com/cfpb/is-money-usd", - "permissions": { - "licenses": [ - { - "name": "Public Domain" - } - ], - "usageType": "openSource" - }, - "laborHours": -1, - "tags": [ - "cfpb" - ], - "contact": { - "email": "tech@consumerfinance.gov" - } - }, { "name": "owning-a-home-api", "description": "The API that drives the Buying a House project. ",