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 🙏

© 2026 – Pkg Stats / Ryan Hefner

jpbank-number-converter

v0.1.1

Published

ゆうちょ銀行(Japan Post Bank)のキャッシュカードに記載されている記号・番号から、他行とのやりとりに使用する口座番号・支店名・支店番号に変換するライブラリ

Readme

jpbank-number-converter

CircleCI

ゆうちょ銀行(Japan Post Bank)のキャッシュカードや通帳に記載されている、ゆうちょ独自の番号から他の銀行口座とやりとりする場合に使う口座番号・支店名などに変換するライブラリです。ゆうちょ銀行・日本郵政などとは一切関係ない非公式なものです。

ゆうちょ銀行はその歴史的な経緯から一般的な金融機関と異なる管理番号が使用されていますが、現在は他の金融機関に準じた番号が用意されています。
しかしながら、利用者の手元にあるキャッシュカードからはそれが分かりづらく、ゆうちょ銀行のサイトにて変換をする必要があります。

このライブラリはゆうちょ銀行のサイトにて示されている変換の公式に基づき、上記公式サイトの変換ページと同等の結果を得るためのシンプルなライブラリです。

使用方法

const jpbank = require('jpbank-number-converter');

var result = jpbank.convert({jpbankSignNumber: '11940',jpbankMiddleNumber:'1',jpbankNumber:'12345'});
// jpbankSignNumber: ゆうちょ銀行で「記号」と称される、ハイフンより前の番号
// jpbankMiddleNumber: 01940-1-12345 のように、2つのハイフンに挟まれる番号(少なくとも現時点では計算には使用していません)
// jpbankNumber: ゆうちょ銀行で「番号」と称される、ハイフンより後の番号

console.log(result.isTransferAccount); //true 振替口座であるかどうか。記号の先頭の数字が1であれば振替口座です。
console.log(result.branchNumber); //199
console.log(result.branchName); //一九九
console.log(result.branchNameKatakana); //イチキユウキユウ
console.log(result.accountNumber); //12345
console.log(result.accountNumberFilled); // 0012345(口座番号が7桁未満だった場合、先頭から0で埋めたもの)

免責事項

MIT Licenseの通り、ライブラリの使用によって発生したトラブルに関して作者は一切の責任を負いません。
実際に金銭の授受が発生するプラットフォームで導入する場合、入念なテストを行った上で使用してください。