{"id":22538151,"url":"https://github.com/cfpb/loan-calc","last_synced_at":"2025-04-09T20:15:21.720Z","repository":{"id":15866843,"uuid":"18607438","full_name":"cfpb/loan-calc","owner":"cfpb","description":"A node module to quickly calculate monthly payments and the total amount of interest paid for a fixed rate loan.","archived":false,"fork":false,"pushed_at":"2014-04-18T19:12:40.000Z","size":346,"stargazers_count":13,"open_issues_count":0,"forks_count":7,"subscribers_count":18,"default_branch":"master","last_synced_at":"2024-04-25T19:21:58.310Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"cc0-1.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/cfpb.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"COPYING.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2014-04-09T18:03:04.000Z","updated_at":"2021-11-03T10:47:09.000Z","dependencies_parsed_at":"2022-08-27T03:25:01.773Z","dependency_job_id":null,"html_url":"https://github.com/cfpb/loan-calc","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cfpb%2Floan-calc","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cfpb%2Floan-calc/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cfpb%2Floan-calc/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cfpb%2Floan-calc/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/cfpb","download_url":"https://codeload.github.com/cfpb/loan-calc/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247968268,"owners_count":21025795,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-12-07T11:10:33.324Z","updated_at":"2025-04-09T20:15:21.696Z","avatar_url":"https://github.com/cfpb.png","language":"JavaScript","readme":"[![Build Status](https://travis-ci.org/cfpb/loan-calc.svg?branch=master)](https://travis-ci.org/cfpb/loan-calc)\n\nQuickly calculate monthly payments and the total amount of interest paid for a fixed rate loan.\n\n## Installation\n\nFirst install [node.js](http://nodejs.org/). Then:\n\n```sh\nnpm install loan-calc --save\n```\n\n## Usage\n\nRequire the module and pass the amount of the loan, annual rate, and length of loan in months.\n\n```javascript\nvar LoanCalc = require('loan-calc');\n\nLoanCalc.paymentCalc({\n    amount: 200000,\n    rate: 5,\n    termMonths: 180\n});\n// returns 1581.59\n\nLoanCalc.totalInterest({\n    amount: 200000,\n    rate: 5,\n    termMonths: 360\n});\n// returns 186511.57\n```\n\nYou can also pass the loan amount as a US currency formatted string:\n\n```javascript\nLoanCalc.paymentCalc({\n    amount: '$200,000',\n    rate: 5,\n    termMonths: 180\n});\n// returns 1581.59\n```\n\n## Contributing\n\nPlease read the [Contributing guidelines](CONTRIBUTING.md).\n\n### Running Tests\n\nWe are using [nodeunit](https://github.com/caolan/nodeunit) to test. To run tests, first install nodeunit and any dependencies via npm:\n\n```\nnpm install\n```\n\nRun tests with:\n\n```\nnpm test\n```\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcfpb%2Floan-calc","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcfpb%2Floan-calc","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcfpb%2Floan-calc/lists"}