use-egn
v1.0.4
Published
Vue composable for parsing Bulgarian personal identification numbers (EGN)
Downloads
2
Readme
use-egn
Installation
npm i use-egn
Usage
The egn parameter can be either a string or a ref.
import { ref } from 'vue';
import { useEgn } from 'use-egn'
const egn = ref('')
const { isValid, birthday, isMale, isFemale } = useEgn(egn)
Component usage
<use-egn
v-slot="{ isValid, birthday, isMale, isFemale }"
:egn="egn"
>
The person was born on {{ birthday }}!
</use-egn>