Skip to content

v4.0.1

Latest
Compare
Choose a tag to compare
@swantzter swantzter released this 29 Aug 07:32
· 1 commit to main since this release
v4.0.1
f460981

This release ensures all imports have a file extensions. This should make it possible to include the library unbundled on websites.

Here's an example that emulates the functionality of jop-io/kontonummer:

<script type="module">
import Kontonummer from 'https://cdn.jsdelivr.net/npm/kontonummer@4.0.1/dist/esm/index.min.js'

function kontonummer (number) {
  try {
    const k = new Kontonummer(number)
    return {
      bank_name: k.bankName,
      clearing_number: k.sortingCode, 
      account_number: k.accountNumber
    }
  } catch {
    return false
  }
}
</script>

Note, of course, the use of type="module", and the impact that has on loading order https://gist.github.com/jakub-g/385ee6b41085303a53ad92c7c8afd7a6