mirror of
https://github.com/sharevb/it-tools.git
synced 2026-11-20 21:23:08 +03:00
1 parent
521d0bf638
commit
9cb58fccf3
4 files changed
+49
No files matched your search
@@ -119,6 +119,7 @@
|
||||
"curlconverter": "^4.12.0",
|
||||
"currency-codes-ts": "^3.0.0",
|
||||
"currency-exchanger-js": "^1.0.4",
|
||||
"damerau-levenshtein": "^1.0.8",
|
||||
"data-guardian": "^1.1.3",
|
||||
"date-fns": "^2.30.0",
|
||||
"date-holidays": "^3.23.21",
|
||||
@@ -324,6 +325,7 @@
|
||||
"@types/bcryptjs": "^2.4.6",
|
||||
"@types/big.js": "^6.2.2",
|
||||
"@types/crypto-js": "^4.2.2",
|
||||
"@types/damerau-levenshtein": "^1.0.2",
|
||||
"@types/dompurify": "^3.2.0",
|
||||
"@types/emscripten": "^1.40.0",
|
||||
"@types/figlet": "^1.7.0",
|
||||
|
||||
Generated
+14
@@ -245,6 +245,9 @@ dependencies:
|
||||
currency-exchanger-js:
|
||||
specifier: ^1.0.4
|
||||
version: 1.0.4
|
||||
damerau-levenshtein:
|
||||
specifier: ^1.0.8
|
||||
version: 1.0.8
|
||||
data-guardian:
|
||||
specifier: ^1.1.3
|
||||
version: 1.1.3
|
||||
@@ -856,6 +859,9 @@ devDependencies:
|
||||
'@types/crypto-js':
|
||||
specifier: ^4.2.2
|
||||
version: 4.2.2
|
||||
'@types/damerau-levenshtein':
|
||||
specifier: ^1.0.2
|
||||
version: 1.0.2
|
||||
'@types/dompurify':
|
||||
specifier: ^3.2.0
|
||||
version: 3.2.0
|
||||
@@ -6465,6 +6471,10 @@ packages:
|
||||
'@types/d3-zoom': 3.0.8
|
||||
dev: false
|
||||
|
||||
/@types/damerau-levenshtein@1.0.2:
|
||||
resolution: {integrity: sha512-2IcR1RKFITuOO24yzurWAS3/2Lo7ptVDTCL+YkCa4Ir1ZjjEfqsJa3nRMhqf4hb+4AkE5nd6cRzqp9qpVvWSfw==}
|
||||
dev: true
|
||||
|
||||
/@types/dompurify@3.2.0:
|
||||
resolution: {integrity: sha512-Fgg31wv9QbLDA0SpTOXO3MaxySc4DKGLi8sna4/Utjo4r3ZRPdCt4UQee8BWr+Q5z21yifghREPJGYaEOEIACg==}
|
||||
deprecated: This is a stub types definition. dompurify provides its own type definitions, so you do not need this installed.
|
||||
@@ -9742,6 +9752,10 @@ packages:
|
||||
lodash-es: 4.17.21
|
||||
dev: false
|
||||
|
||||
/damerau-levenshtein@1.0.8:
|
||||
resolution: {integrity: sha512-sdQSFB7+llfUcQHUQO3+B8ERRj0Oa4w9POWMI/puGtuf7gFywGmkaLCElnudfTiKZV+NvHqL0ifzdrI8Ro7ESA==}
|
||||
dev: false
|
||||
|
||||
/dashdash@1.14.1:
|
||||
resolution: {integrity: sha512-jRFi8UDGo6j+odZiEpjazZaWqEal3w/basFjQHQEwVtZJGDpxbH1MeYluwCS8Xq5wmLJooDlMgvVarmWfGM44g==}
|
||||
engines: {node: '>=0.10'}
|
||||
|
||||
@@ -0,0 +1,13 @@
|
||||
import { Dimensions } from '@vicons/tabler';
|
||||
import { defineTool } from '../tool';
|
||||
|
||||
export const tool = defineTool({
|
||||
name: 'Levenshtein Calculator',
|
||||
path: '/levenshtein-calculator',
|
||||
description: 'Compute Levenshtein distance and scores between to strings',
|
||||
keywords: ['levenshtein', 'damerau', 'distance', 'calculator'],
|
||||
component: () => import('./levenshtein-calculator.vue'),
|
||||
icon: Dimensions,
|
||||
createdAt: new Date('2025-07-19'),
|
||||
category: 'Text',
|
||||
});
|
||||
@@ -0,0 +1,20 @@
|
||||
<script setup lang="ts">
|
||||
import levenshtein from 'damerau-levenshtein';
|
||||
|
||||
const stringA = ref('');
|
||||
const stringB = ref('');
|
||||
const result = computed(() => levenshtein(stringA.value, stringB.value));
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<c-input-text v-model:value="stringA" label="First string:" label-position="left" placeholder="Enter first string" mb-1 />
|
||||
<c-input-text v-model:value="stringB" label="Second string:" label-position="left" placeholder="Enter second string" mb-1 />
|
||||
|
||||
<n-divider />
|
||||
|
||||
<c-card v-if="result" title="Results">
|
||||
<input-copyable label="Distance" label-position="left" :value="result.steps" mb-1 />
|
||||
<input-copyable label="Relative Distance" label-position="left" :value="result.relative" mb-1 />
|
||||
<input-copyable label="Similarity" label-position="left" :value="result.similarity" mb-1 />
|
||||
</c-card>
|
||||
</template>
|
||||
Reference in new issue
Block a user