epc-sepa-converter
TypeScript icon, indicating that this package has built-in type declarations

0.1.2 • Public • Published

EPC217-08 SEPA Conversion

Convert strings to the "EPC Basic Character Set" according to the EPC217-08 SEPA Conversion Table.

That means, any string will be boiled down to these characters, outlined in EPC217-08 Draft Best Practices SEPA Requirements for Character Set v1.1.pdf:

a b c d e f g h i j k l m n o p q r s t u v w x y z
A B C D E F G H I J K L M N O P Q R S T U V W X Y Z
0 1 2 3 4 5 6 7 8 9
/ - ? : ( ) . , ' +
(Space)

[!NOTE] I wasn't able to completely understand what to do with & and ", so they will also be preserved, even though they are not part of this set. Replace or remove them if your bank has problems with them. Or, even better, send a PR!

Installation

npm i epc-sepa-converter

Usage

import * as ECP217 from 'epc-sepa-converter'

ECP217.convert("Fußgängerübergänge")
// => "Fusgangerubergange"

ECP217.convert("Bärbel Garçon")
// => "Barbel Garcon"

ECP217.convert("J’accuse") // Typographic apostrophe
// => "J.accuse"

// & and " and ' are _not_ replaced, because there are no replacements for them defined in the Excel file.
ECP217.convert('Ben & Jerry present: "Ice Cream"')
// => 'Ben & Jerry present: "Ice Cream"'

Development


Developed with 💙 at Eintrittskarten.io.

Readme

Keywords

Package Sidebar

Install

npm i epc-sepa-converter

Weekly Downloads

1

Version

0.1.2

License

ISC

Unpacked Size

38 kB

Total Files

9

Last publish

Collaborators

  • danieldiekmeier