mirror of
https://github.com/sharevb/it-tools.git
synced 2026-11-20 21:23:08 +03:00
feat(Rune Converter): add StavelessFuthark
This commit is contained in:
1 parent
2037d14cd6
commit
8efe340740
3 files changed
+18
-2
No files matched your search
@@ -251,6 +251,7 @@
|
||||
"spdx-satisfies": "^5.0.1",
|
||||
"sql-formatter": "^15.5.1",
|
||||
"sshpk": "^1.18.0",
|
||||
"staveless-futhark": "^0.6.1",
|
||||
"stringify-object": "^5.0.0",
|
||||
"svg2png-wasm": "^1.4.1",
|
||||
"svgo": "^3.3.2",
|
||||
|
||||
Generated
+8
@@ -650,6 +650,9 @@ dependencies:
|
||||
sshpk:
|
||||
specifier: ^1.18.0
|
||||
version: 1.18.0
|
||||
staveless-futhark:
|
||||
specifier: ^0.6.1
|
||||
version: 0.6.1
|
||||
stringify-object:
|
||||
specifier: ^5.0.0
|
||||
version: 5.0.0
|
||||
@@ -16310,6 +16313,11 @@ packages:
|
||||
escodegen: 1.14.3
|
||||
dev: false
|
||||
|
||||
/staveless-futhark@0.6.1:
|
||||
resolution: {integrity: sha512-1pypneqdPd5qIPUBuf8gRr1VjoS6DSc72vL3ervyqMfFpT98skVAmdRMaz+9FOM/N9D8bs5htvyd8Yxv9ltezg==}
|
||||
engines: {node: '>=12.0.0'}
|
||||
dev: false
|
||||
|
||||
/std-env@3.3.3:
|
||||
resolution: {integrity: sha512-Rz6yejtVyWnVjC1RFvNmYL10kgjC49EOghxWn0RFqlCHGFpQx+Xe7yW3I4ceK1SGrWIGMjD5Kbue8W/udkbMJg==}
|
||||
dev: true
|
||||
|
||||
@@ -1,8 +1,9 @@
|
||||
<script setup lang="ts">
|
||||
import { elderFuthark, futhorc, medievalFuthork, youngerFuthark } from 'riimut';
|
||||
import { lettersToRunes as stavelessFutharkLettersToRunes, runesToLetters as stavelessFutharkRunesToLetters } from 'staveless-futhark';
|
||||
import { useCopy } from '@/composable/copy';
|
||||
|
||||
type RuneType = 'YoungerFutharkLong' | 'YoungerFutharkShort' | 'ElderFuthark' | 'MedievalFuthork' | 'Futhorc';
|
||||
type RuneType = 'YoungerFutharkLong' | 'YoungerFutharkShort' | 'ElderFuthark' | 'MedievalFuthork' | 'Futhorc' | 'StavelessFuthark';
|
||||
|
||||
function convertTextToRunes(text: string, type: RuneType) {
|
||||
if (type === 'YoungerFutharkLong') {
|
||||
@@ -20,6 +21,9 @@ function convertTextToRunes(text: string, type: RuneType) {
|
||||
if (type === 'Futhorc') {
|
||||
return futhorc.lettersToRunes(text);
|
||||
}
|
||||
if (type === 'StavelessFuthark') {
|
||||
return stavelessFutharkLettersToRunes(text);
|
||||
}
|
||||
return text;
|
||||
}
|
||||
|
||||
@@ -39,6 +43,9 @@ function convertRunesToText(runes: string, type: RuneType) {
|
||||
if (type === 'Futhorc') {
|
||||
return futhorc.runesToLetters(runes);
|
||||
}
|
||||
if (type === 'StavelessFuthark') {
|
||||
return stavelessFutharkRunesToLetters(runes);
|
||||
}
|
||||
return runes;
|
||||
}
|
||||
|
||||
@@ -59,7 +66,7 @@ const { copy: copyText } = useCopy({ source: textFromRunes });
|
||||
v-model:value="runeType"
|
||||
label="Rune Type:"
|
||||
label-position="left"
|
||||
:options="['YoungerFutharkLong', 'YoungerFutharkShort', 'ElderFuthark', 'MedievalFuthork', 'Futhorc']"
|
||||
:options="['YoungerFutharkLong', 'YoungerFutharkShort', 'ElderFuthark', 'MedievalFuthork', 'Futhorc', 'StavelessFuthark']"
|
||||
placeholder="Rune Type:"
|
||||
mb-2
|
||||
/>
|
||||
|
||||
Reference in new issue
Block a user