Efficient composable for string matching tasks, utilizing Levenshtein distance calculation. Simplify comparison operations with minimal setup. Enhance text similarity checks effortlessly.
isMatching: true
score: 0.8333333333333334
<template>
<MazInput v-model="string1" label="Enter first string" />
<MazInput v-model="string2" label="Enter second string" />
<p>
<b>isMatching:</b> {{ isMatching }}
</p>
<p>
<b>score:</b> {{ score }}
</p>
</template>
<script lang="ts" setup>
import { ref } from 'vue'
import { useStringMatching } from 'maz-ui'
const string1 = ref<string>('maz-ui')
const string2 = ref<string>('màéz-uiok')
const { score, isMatching } = useStringMatching(string1, string2)
</script>