Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

epc-sepa-converter

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

epc-sepa-converter

Convert strings to their EPC217-08 variant

  • 0.1.2
  • latest
  • npm
  • Socket score

Version published
Weekly downloads
6
decreased by-14.29%
Maintainers
1
Weekly downloads
 
Created
Source

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

  • Put the 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.

Keywords

FAQs

Package last updated on 15 May 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc