Sign Up for Free

RunKit +

Try any Node.js package right in your browser

This is a playground to test code. It runs a full Node.js environment and already has all of npm’s 400,000 packages pre-installed, including clearingnummer with all npm packages installed. Try it out:

var clearingnummer = require("clearingnummer")

This service is provided by RunKit and is not affiliated with npm, Inc or the package authors.

clearingnummer v0.5.0

Clearing numbers for Swedish banks

Clearingnummer

npm version Build Status Code Climate Test Coverage

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
RunKit is a free, in-browser JavaScript dev environment for prototyping Node.js code, with every npm package installed. Sign up to share your code.
Sign Up for Free