mirror of
https://github.com/CorentinTh/it-tools.git
synced 2025-05-08 15:15:02 -04:00
Removed unused format options
This commit is contained in:
parent
3a13b79572
commit
84934504c7
2 changed files with 3 additions and 6 deletions
3
components.d.ts
vendored
3
components.d.ts
vendored
|
@ -91,7 +91,6 @@ declare module '@vue/runtime-core' {
|
||||||
'IconMdi:contentCopy': typeof import('~icons/mdi/content-copy')['default']
|
'IconMdi:contentCopy': typeof import('~icons/mdi/content-copy')['default']
|
||||||
'IconMdi:kettleSteamOutline': typeof import('~icons/mdi/kettle-steam-outline')['default']
|
'IconMdi:kettleSteamOutline': typeof import('~icons/mdi/kettle-steam-outline')['default']
|
||||||
IconMdiArrowDown: typeof import('~icons/mdi/arrow-down')['default']
|
IconMdiArrowDown: typeof import('~icons/mdi/arrow-down')['default']
|
||||||
IconMdiArrowRight: typeof import('~icons/mdi/arrow-right')['default']
|
|
||||||
IconMdiArrowRightBottom: typeof import('~icons/mdi/arrow-right-bottom')['default']
|
IconMdiArrowRightBottom: typeof import('~icons/mdi/arrow-right-bottom')['default']
|
||||||
IconMdiCamera: typeof import('~icons/mdi/camera')['default']
|
IconMdiCamera: typeof import('~icons/mdi/camera')['default']
|
||||||
IconMdiChevronDown: typeof import('~icons/mdi/chevron-down')['default']
|
IconMdiChevronDown: typeof import('~icons/mdi/chevron-down')['default']
|
||||||
|
@ -171,8 +170,6 @@ declare module '@vue/runtime-core' {
|
||||||
NTable: typeof import('naive-ui')['NTable']
|
NTable: typeof import('naive-ui')['NTable']
|
||||||
NTag: typeof import('naive-ui')['NTag']
|
NTag: typeof import('naive-ui')['NTag']
|
||||||
NumeronymGenerator: typeof import('./src/tools/numeronym-generator/numeronym-generator.vue')['default']
|
NumeronymGenerator: typeof import('./src/tools/numeronym-generator/numeronym-generator.vue')['default']
|
||||||
NUpload: typeof import('naive-ui')['NUpload']
|
|
||||||
NUploadDragger: typeof import('naive-ui')['NUploadDragger']
|
|
||||||
OtpCodeGeneratorAndValidator: typeof import('./src/tools/otp-code-generator-and-validator/otp-code-generator-and-validator.vue')['default']
|
OtpCodeGeneratorAndValidator: typeof import('./src/tools/otp-code-generator-and-validator/otp-code-generator-and-validator.vue')['default']
|
||||||
PasswordStrengthAnalyser: typeof import('./src/tools/password-strength-analyser/password-strength-analyser.vue')['default']
|
PasswordStrengthAnalyser: typeof import('./src/tools/password-strength-analyser/password-strength-analyser.vue')['default']
|
||||||
PdfSignatureChecker: typeof import('./src/tools/pdf-signature-checker/pdf-signature-checker.vue')['default']
|
PdfSignatureChecker: typeof import('./src/tools/pdf-signature-checker/pdf-signature-checker.vue')['default']
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
import { type MaybeRef, get } from '@vueuse/core';
|
import { type MaybeRef, get } from '@vueuse/core';
|
||||||
|
|
||||||
import yaml from "js-yaml";
|
import yaml from "js-yaml";
|
||||||
|
|
||||||
export { formatYaml };
|
export { formatYaml };
|
||||||
|
@ -10,14 +11,13 @@ function formatYaml({
|
||||||
}: {
|
}: {
|
||||||
rawYaml: MaybeRef<string>
|
rawYaml: MaybeRef<string>
|
||||||
sortKeys?: MaybeRef<boolean>
|
sortKeys?: MaybeRef<boolean>
|
||||||
stripComments?: MaybeRef<boolean>
|
|
||||||
indentSize?: MaybeRef<number>
|
indentSize?: MaybeRef<number>
|
||||||
}) {
|
}) {
|
||||||
const parsedYaml = yaml.load(get(rawYaml));
|
const parsedYaml = yaml.load(get(rawYaml));
|
||||||
|
|
||||||
const formattedYAML = yaml.dump(parsedYaml, {
|
const formattedYAML = yaml.dump(parsedYaml, {
|
||||||
indent: get(indentSize),
|
sortKeys: get(sortKeys),
|
||||||
sortKeys: get(sortKeys)
|
indent: get(indentSize)
|
||||||
});
|
});
|
||||||
|
|
||||||
return formattedYAML
|
return formattedYAML
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue