Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/danieldiekmeier/epc-sepa-converter
Convert strings to the "EPC Basic Character Set" according to the EPC217-08 SEPA Conversion Table.
https://github.com/danieldiekmeier/epc-sepa-converter
Last synced: about 7 hours ago
JSON representation
Convert strings to the "EPC Basic Character Set" according to the EPC217-08 SEPA Conversion Table.
- Host: GitHub
- URL: https://github.com/danieldiekmeier/epc-sepa-converter
- Owner: danieldiekmeier
- License: other
- Created: 2024-05-15T22:08:20.000Z (6 months ago)
- Default Branch: main
- Last Pushed: 2024-05-15T22:37:43.000Z (6 months ago)
- Last Synced: 2024-10-29T21:58:53.541Z (17 days ago)
- Language: JavaScript
- Size: 8.79 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
# 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](https://www.europeanpaymentscouncil.eu/sites/default/files/KB/files/EPC217-08%20Draft%20Best%20Practices%20SEPA%20Requirements%20for%20Character%20Set%20v1.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
```sh
npm i epc-sepa-converter
```## Usage
```js
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
- Put the [EPC217-08-SEPA-Conversion-Table.xls](https://www.europeanpaymentscouncil.eu/sites/default/files/KB/files/EPC217-08-SEPA-Conversion-Table.xls) into `bin`
- Run `pnpm generate-map`
- Run the tests with `pnpm test` (or `pnpm test:watch`)
- Generate type declarations with `pnpm tsc`---
Developed with 💙 at [Eintrittskarten.io](https://eintrittskarten.io).