Share your code. npm Orgs help your team discover, share, and reuse code. Create a free org »

clearingnummer

0.8.1 • Public • Published

Clearingnummer

npm version Build Status Code Climate Test Coverage Known Vulnerabilities

Sort codes, clearingnummer in Swedish, are four or five digit identifiers for Swedish banks. This package helps you find the bank related to a specific number. All clearing numbers are taken from Wikipedia and Swedish Bankers Association.

Installation

yarn add clearingnummer

Services

bankName()

bankName(string | number): string

Retrieve bank name for a given number

Example
import clearingnummer from 'clearingnummer'
 
clearingnummer.bankName(5202)
// 'SEB'

clearingNumbers()

clearingNumbers(string): { min: string | number, max: string | number }[]

Retrieve clearing numbers for a given bank name

Example
import clearingnummer from 'clearingnummer'
 
clearingnummer.clearingNumbers('Ålandsbanken')
// [{
     "min": 2310,
     "max": 2310
   }]

allBanks

allBanks(): string[]

Retrieve the names of all banks in the listing

import clearingnummer from 'clearingnummer'
 
clearingnummer.allBanks()
// [
  'ABN AMRO',
  'Avanza Bank'
  ...
]

Tests

npm test

Contributors

Thanks goes to these wonderful people (emoji key):


Rickard Laurin

🐛 💻 📖 👀

Fredrik Ohlin

💻

Ivan Kustera

💻

This project follows the all-contributors specification. Contributions of any kind welcome!

install

npm i clearingnummer

Downloadsweekly downloads

62

version

0.8.1

license

MIT

homepage

github.com

repository

Gitgithub

last publish

collaborators

  • avatar
Report a vulnerability