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.
This is a semi-port of my JavaScript library Clearingnummer written completely in Reason.
npm install @opendevtools/rescript-clearingnummer
Add @opendevtools/rescript-clearingnummer
to bs-dependencies
in bsconfig.json
Takes a clearing number as int
. This is the most common format.
(* int => string *)
let bankName = Clearingnummer.BankName.fromInt(5202)
(* bankName = "SEB" *)
Used by Swedbank and their old bank names (sparbanker)
(* string => string *)
let bankName = Clearingnummer.BankName.fromString("8060-6")
(* bankName = "Swedbank" *)
(* array(string) *)
let banks = Clearingnummer.Banks.all
(* banks = ["Amfa Bank", "Avanza Bank", ...] *)
Build JavaScript files first using npm run build
or npm run start
$ npm test