npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

house-loan-calculator

v1.0.4

Published

A Chinese policy based calculator of house loan.

Downloads

12

Readme

house-loan-calculator

A Chinese policy based calculator of house loan.

基于中国国情的购房贷款计算器

Usage

Export three calculate functions: houseLoanCalc, averageCapital, averageInterest.

提供三种计算方法:houseLoanCalc、averageCapital、averageInterest。分别是组合计算器,等额本金计算器,等额本息计算器。

houseLoanCalc

组合计算器:公积金贷款、商业贷款组合计算

  • {float} comLoanAmount 商业贷款金额(百万)
  • {float} resLoanAmount 公积金贷款金额(百万)
  • {float} comRate 商业贷款年利率(年利率%) eg. 4.9对应4.9%
  • {float} resRate 公积金贷款年利率(年利率%) eg. 4.9对应4.9%
  • {int} comLoanMonth 商业贷款期数
  • {int} resLoanMonth 公积金贷款期数
  • {string} loanType 还款方式['debj', 'debx']

Example:

// 房贷计算器---组合贷款(等额本息)
const combHouseDebx = houseLoanCalc(100, 4.9, 240, 100, 3.25, 240, 'debx')
console.log('combinational house loan debx calc:', combHouseDebx)

// 房贷计算器---组合贷款(等额本金)
const combHouseDebj = houseLoanCalc(100, 4.9, 240, 100, 3.25, 240, 'debj')
console.log('combinational house loan debj calc:', combHouseDebj)

averageCapital

非组合贷的等额本金计算器

  • {float} oriAmount 贷款金额(万元)
  • {float} oriRate 贷款利率(年利率%) eg. 4.9%
  • {int} loanMonth 贷款期数

Example:

// 房贷计算器---等额本金
const houseDebj = averageCapital(100, 4.9, 240)
console.log('house loan debj calc', houseDebj)

averageInterest

非组合贷的等额本息计算器

  • {float} oriAmount 贷款金额(万元)
  • {float} oriRate 贷款利率(年利率%) eg. 4.9%
  • {int} loanMonth 贷款期数

Example:

// 房贷计算器---等额本息
const houseDebx = averageInterest(100, 3.25, 240)
console.log('house loan debx calc', houseDebx)