mirror of
https://github.com/sharevb/it-tools.git
synced 2026-11-25 15:15:23 +03:00
Compare commits
5
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
8e9c5c057b | ||
|
|
318fb6efb9 | ||
|
|
f1a5489e21 | ||
|
|
e1b4f9aafe | ||
|
|
76a19d218d |
No files matched your search
Vendored
+4
-31
@@ -72,6 +72,7 @@ declare module '@vue/runtime-core' {
|
|||||||
DockerRunToDockerComposeConverter: typeof import('./src/tools/docker-run-to-docker-compose-converter/docker-run-to-docker-compose-converter.vue')['default']
|
DockerRunToDockerComposeConverter: typeof import('./src/tools/docker-run-to-docker-compose-converter/docker-run-to-docker-compose-converter.vue')['default']
|
||||||
DynamicValues: typeof import('./src/tools/benchmark-builder/dynamic-values.vue')['default']
|
DynamicValues: typeof import('./src/tools/benchmark-builder/dynamic-values.vue')['default']
|
||||||
Editor: typeof import('./src/tools/html-wysiwyg-editor/editor/editor.vue')['default']
|
Editor: typeof import('./src/tools/html-wysiwyg-editor/editor/editor.vue')['default']
|
||||||
|
EmailNormalizer: typeof import('./src/tools/email-normalizer/email-normalizer.vue')['default']
|
||||||
EmojiCard: typeof import('./src/tools/emoji-picker/emoji-card.vue')['default']
|
EmojiCard: typeof import('./src/tools/emoji-picker/emoji-card.vue')['default']
|
||||||
EmojiGrid: typeof import('./src/tools/emoji-picker/emoji-grid.vue')['default']
|
EmojiGrid: typeof import('./src/tools/emoji-picker/emoji-grid.vue')['default']
|
||||||
EmojiPicker: typeof import('./src/tools/emoji-picker/emoji-picker.vue')['default']
|
EmojiPicker: typeof import('./src/tools/emoji-picker/emoji-picker.vue')['default']
|
||||||
@@ -89,28 +90,17 @@ declare module '@vue/runtime-core' {
|
|||||||
HttpStatusCodes: typeof import('./src/tools/http-status-codes/http-status-codes.vue')['default']
|
HttpStatusCodes: typeof import('./src/tools/http-status-codes/http-status-codes.vue')['default']
|
||||||
IbanValidatorAndParser: typeof import('./src/tools/iban-validator-and-parser/iban-validator-and-parser.vue')['default']
|
IbanValidatorAndParser: typeof import('./src/tools/iban-validator-and-parser/iban-validator-and-parser.vue')['default']
|
||||||
'IconMdi:brushVariant': typeof import('~icons/mdi/brush-variant')['default']
|
'IconMdi:brushVariant': typeof import('~icons/mdi/brush-variant')['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']
|
|
||||||
IconMdiArrowRightBottom: typeof import('~icons/mdi/arrow-right-bottom')['default']
|
|
||||||
IconMdiCamera: typeof import('~icons/mdi/camera')['default']
|
|
||||||
IconMdiChevronDown: typeof import('~icons/mdi/chevron-down')['default']
|
IconMdiChevronDown: typeof import('~icons/mdi/chevron-down')['default']
|
||||||
IconMdiChevronRight: typeof import('~icons/mdi/chevron-right')['default']
|
IconMdiChevronRight: typeof import('~icons/mdi/chevron-right')['default']
|
||||||
IconMdiClose: typeof import('~icons/mdi/close')['default']
|
IconMdiClose: typeof import('~icons/mdi/close')['default']
|
||||||
IconMdiContentCopy: typeof import('~icons/mdi/content-copy')['default']
|
IconMdiContentCopy: typeof import('~icons/mdi/content-copy')['default']
|
||||||
IconMdiDeleteOutline: typeof import('~icons/mdi/delete-outline')['default']
|
|
||||||
IconMdiDownload: typeof import('~icons/mdi/download')['default']
|
|
||||||
IconMdiEye: typeof import('~icons/mdi/eye')['default']
|
IconMdiEye: typeof import('~icons/mdi/eye')['default']
|
||||||
IconMdiEyeOff: typeof import('~icons/mdi/eye-off')['default']
|
IconMdiEyeOff: typeof import('~icons/mdi/eye-off')['default']
|
||||||
IconMdiHeart: typeof import('~icons/mdi/heart')['default']
|
IconMdiHeart: typeof import('~icons/mdi/heart')['default']
|
||||||
IconMdiPause: typeof import('~icons/mdi/pause')['default']
|
|
||||||
IconMdiPlay: typeof import('~icons/mdi/play')['default']
|
|
||||||
IconMdiRecord: typeof import('~icons/mdi/record')['default']
|
|
||||||
IconMdiRefresh: typeof import('~icons/mdi/refresh')['default']
|
|
||||||
IconMdiSearch: typeof import('~icons/mdi/search')['default']
|
IconMdiSearch: typeof import('~icons/mdi/search')['default']
|
||||||
IconMdiTranslate: typeof import('~icons/mdi/translate')['default']
|
IconMdiTranslate: typeof import('~icons/mdi/translate')['default']
|
||||||
IconMdiTriangleDown: typeof import('~icons/mdi/triangle-down')['default']
|
IconMdiTriangleDown: typeof import('~icons/mdi/triangle-down')['default']
|
||||||
IconMdiVideo: typeof import('~icons/mdi/video')['default']
|
|
||||||
InputCopyable: typeof import('./src/components/InputCopyable.vue')['default']
|
InputCopyable: typeof import('./src/components/InputCopyable.vue')['default']
|
||||||
IntegerBaseConverter: typeof import('./src/tools/integer-base-converter/integer-base-converter.vue')['default']
|
IntegerBaseConverter: typeof import('./src/tools/integer-base-converter/integer-base-converter.vue')['default']
|
||||||
Ipv4AddressConverter: typeof import('./src/tools/ipv4-address-converter/ipv4-address-converter.vue')['default']
|
Ipv4AddressConverter: typeof import('./src/tools/ipv4-address-converter/ipv4-address-converter.vue')['default']
|
||||||
@@ -121,6 +111,7 @@ declare module '@vue/runtime-core' {
|
|||||||
JsonMinify: typeof import('./src/tools/json-minify/json-minify.vue')['default']
|
JsonMinify: typeof import('./src/tools/json-minify/json-minify.vue')['default']
|
||||||
JsonToCsv: typeof import('./src/tools/json-to-csv/json-to-csv.vue')['default']
|
JsonToCsv: typeof import('./src/tools/json-to-csv/json-to-csv.vue')['default']
|
||||||
JsonToToml: typeof import('./src/tools/json-to-toml/json-to-toml.vue')['default']
|
JsonToToml: typeof import('./src/tools/json-to-toml/json-to-toml.vue')['default']
|
||||||
|
JsonToXml: typeof import('./src/tools/json-to-xml/json-to-xml.vue')['default']
|
||||||
JsonToYaml: typeof import('./src/tools/json-to-yaml-converter/json-to-yaml.vue')['default']
|
JsonToYaml: typeof import('./src/tools/json-to-yaml-converter/json-to-yaml.vue')['default']
|
||||||
JsonViewer: typeof import('./src/tools/json-viewer/json-viewer.vue')['default']
|
JsonViewer: typeof import('./src/tools/json-viewer/json-viewer.vue')['default']
|
||||||
JwtParser: typeof import('./src/tools/jwt-parser/jwt-parser.vue')['default']
|
JwtParser: typeof import('./src/tools/jwt-parser/jwt-parser.vue')['default']
|
||||||
@@ -137,40 +128,20 @@ declare module '@vue/runtime-core' {
|
|||||||
MenuLayout: typeof import('./src/components/MenuLayout.vue')['default']
|
MenuLayout: typeof import('./src/components/MenuLayout.vue')['default']
|
||||||
MetaTagGenerator: typeof import('./src/tools/meta-tag-generator/meta-tag-generator.vue')['default']
|
MetaTagGenerator: typeof import('./src/tools/meta-tag-generator/meta-tag-generator.vue')['default']
|
||||||
MimeTypes: typeof import('./src/tools/mime-types/mime-types.vue')['default']
|
MimeTypes: typeof import('./src/tools/mime-types/mime-types.vue')['default']
|
||||||
NAlert: typeof import('naive-ui')['NAlert']
|
|
||||||
NavbarButtons: typeof import('./src/components/NavbarButtons.vue')['default']
|
NavbarButtons: typeof import('./src/components/NavbarButtons.vue')['default']
|
||||||
NCheckbox: typeof import('naive-ui')['NCheckbox']
|
|
||||||
NCode: typeof import('naive-ui')['NCode']
|
|
||||||
NCollapseTransition: typeof import('naive-ui')['NCollapseTransition']
|
NCollapseTransition: typeof import('naive-ui')['NCollapseTransition']
|
||||||
NColorPicker: typeof import('naive-ui')['NColorPicker']
|
|
||||||
NConfigProvider: typeof import('naive-ui')['NConfigProvider']
|
NConfigProvider: typeof import('naive-ui')['NConfigProvider']
|
||||||
NDatePicker: typeof import('naive-ui')['NDatePicker']
|
|
||||||
NDivider: typeof import('naive-ui')['NDivider']
|
|
||||||
NDynamicInput: typeof import('naive-ui')['NDynamicInput']
|
|
||||||
NEllipsis: typeof import('naive-ui')['NEllipsis']
|
NEllipsis: typeof import('naive-ui')['NEllipsis']
|
||||||
NForm: typeof import('naive-ui')['NForm']
|
|
||||||
NFormItem: typeof import('naive-ui')['NFormItem']
|
NFormItem: typeof import('naive-ui')['NFormItem']
|
||||||
NGi: typeof import('naive-ui')['NGi']
|
|
||||||
NGrid: typeof import('naive-ui')['NGrid']
|
|
||||||
NH1: typeof import('naive-ui')['NH1']
|
NH1: typeof import('naive-ui')['NH1']
|
||||||
NH2: typeof import('naive-ui')['NH2']
|
|
||||||
NH3: typeof import('naive-ui')['NH3']
|
NH3: typeof import('naive-ui')['NH3']
|
||||||
NIcon: typeof import('naive-ui')['NIcon']
|
NIcon: typeof import('naive-ui')['NIcon']
|
||||||
NImage: typeof import('naive-ui')['NImage']
|
|
||||||
NInputGroup: typeof import('naive-ui')['NInputGroup']
|
|
||||||
NInputGroupLabel: typeof import('naive-ui')['NInputGroupLabel']
|
|
||||||
NInputNumber: typeof import('naive-ui')['NInputNumber']
|
NInputNumber: typeof import('naive-ui')['NInputNumber']
|
||||||
NLayout: typeof import('naive-ui')['NLayout']
|
NLayout: typeof import('naive-ui')['NLayout']
|
||||||
NLayoutSider: typeof import('naive-ui')['NLayoutSider']
|
NLayoutSider: typeof import('naive-ui')['NLayoutSider']
|
||||||
NMenu: typeof import('naive-ui')['NMenu']
|
NMenu: typeof import('naive-ui')['NMenu']
|
||||||
NProgress: typeof import('naive-ui')['NProgress']
|
|
||||||
NScrollbar: typeof import('naive-ui')['NScrollbar']
|
|
||||||
NSlider: typeof import('naive-ui')['NSlider']
|
NSlider: typeof import('naive-ui')['NSlider']
|
||||||
NSpin: typeof import('naive-ui')['NSpin']
|
|
||||||
NStatistic: typeof import('naive-ui')['NStatistic']
|
|
||||||
NSwitch: typeof import('naive-ui')['NSwitch']
|
NSwitch: typeof import('naive-ui')['NSwitch']
|
||||||
NTable: typeof import('naive-ui')['NTable']
|
|
||||||
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']
|
||||||
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']
|
||||||
@@ -178,6 +149,7 @@ declare module '@vue/runtime-core' {
|
|||||||
PdfSignatureDetails: typeof import('./src/tools/pdf-signature-checker/components/pdf-signature-details.vue')['default']
|
PdfSignatureDetails: typeof import('./src/tools/pdf-signature-checker/components/pdf-signature-details.vue')['default']
|
||||||
PercentageCalculator: typeof import('./src/tools/percentage-calculator/percentage-calculator.vue')['default']
|
PercentageCalculator: typeof import('./src/tools/percentage-calculator/percentage-calculator.vue')['default']
|
||||||
PhoneParserAndFormatter: typeof import('./src/tools/phone-parser-and-formatter/phone-parser-and-formatter.vue')['default']
|
PhoneParserAndFormatter: typeof import('./src/tools/phone-parser-and-formatter/phone-parser-and-formatter.vue')['default']
|
||||||
|
PinCodeGenerator: typeof import('./src/tools/pin-code-generator/pin-code-generator.vue')['default']
|
||||||
QrCodeGenerator: typeof import('./src/tools/qr-code-generator/qr-code-generator.vue')['default']
|
QrCodeGenerator: typeof import('./src/tools/qr-code-generator/qr-code-generator.vue')['default']
|
||||||
RandomPortGenerator: typeof import('./src/tools/random-port-generator/random-port-generator.vue')['default']
|
RandomPortGenerator: typeof import('./src/tools/random-port-generator/random-port-generator.vue')['default']
|
||||||
ResultRow: typeof import('./src/tools/ipv4-range-expander/result-row.vue')['default']
|
ResultRow: typeof import('./src/tools/ipv4-range-expander/result-row.vue')['default']
|
||||||
@@ -212,6 +184,7 @@ declare module '@vue/runtime-core' {
|
|||||||
UuidGenerator: typeof import('./src/tools/uuid-generator/uuid-generator.vue')['default']
|
UuidGenerator: typeof import('./src/tools/uuid-generator/uuid-generator.vue')['default']
|
||||||
WifiQrCodeGenerator: typeof import('./src/tools/wifi-qr-code-generator/wifi-qr-code-generator.vue')['default']
|
WifiQrCodeGenerator: typeof import('./src/tools/wifi-qr-code-generator/wifi-qr-code-generator.vue')['default']
|
||||||
XmlFormatter: typeof import('./src/tools/xml-formatter/xml-formatter.vue')['default']
|
XmlFormatter: typeof import('./src/tools/xml-formatter/xml-formatter.vue')['default']
|
||||||
|
XmlToJson: typeof import('./src/tools/xml-to-json/xml-to-json.vue')['default']
|
||||||
YamlToJson: typeof import('./src/tools/yaml-to-json-converter/yaml-to-json.vue')['default']
|
YamlToJson: typeof import('./src/tools/yaml-to-json-converter/yaml-to-json.vue')['default']
|
||||||
YamlToToml: typeof import('./src/tools/yaml-to-toml/yaml-to-toml.vue')['default']
|
YamlToToml: typeof import('./src/tools/yaml-to-toml/yaml-to-toml.vue')['default']
|
||||||
YamlViewer: typeof import('./src/tools/yaml-viewer/yaml-viewer.vue')['default']
|
YamlViewer: typeof import('./src/tools/yaml-viewer/yaml-viewer.vue')['default']
|
||||||
|
|||||||
@@ -57,6 +57,7 @@
|
|||||||
"crypto-js": "^4.1.1",
|
"crypto-js": "^4.1.1",
|
||||||
"date-fns": "^2.29.3",
|
"date-fns": "^2.29.3",
|
||||||
"dompurify": "^3.0.6",
|
"dompurify": "^3.0.6",
|
||||||
|
"email-normalizer": "^1.0.0",
|
||||||
"emojilib": "^3.0.10",
|
"emojilib": "^3.0.10",
|
||||||
"figlet": "^1.7.0",
|
"figlet": "^1.7.0",
|
||||||
"figue": "^1.2.0",
|
"figue": "^1.2.0",
|
||||||
@@ -92,6 +93,7 @@
|
|||||||
"vue-router": "^4.1.6",
|
"vue-router": "^4.1.6",
|
||||||
"vue-tsc": "^1.8.1",
|
"vue-tsc": "^1.8.1",
|
||||||
"xml-formatter": "^3.3.2",
|
"xml-formatter": "^3.3.2",
|
||||||
|
"xml-js": "^1.6.11",
|
||||||
"yaml": "^2.2.1"
|
"yaml": "^2.2.1"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
|
|||||||
Generated
+37
-13
@@ -71,6 +71,9 @@ dependencies:
|
|||||||
dompurify:
|
dompurify:
|
||||||
specifier: ^3.0.6
|
specifier: ^3.0.6
|
||||||
version: 3.0.6
|
version: 3.0.6
|
||||||
|
email-normalizer:
|
||||||
|
specifier: ^1.0.0
|
||||||
|
version: 1.0.0
|
||||||
emojilib:
|
emojilib:
|
||||||
specifier: ^3.0.10
|
specifier: ^3.0.10
|
||||||
version: 3.0.10
|
version: 3.0.10
|
||||||
@@ -176,6 +179,9 @@ dependencies:
|
|||||||
xml-formatter:
|
xml-formatter:
|
||||||
specifier: ^3.3.2
|
specifier: ^3.3.2
|
||||||
version: 3.3.2
|
version: 3.3.2
|
||||||
|
xml-js:
|
||||||
|
specifier: ^1.6.11
|
||||||
|
version: 1.6.11
|
||||||
yaml:
|
yaml:
|
||||||
specifier: ^2.2.1
|
specifier: ^2.2.1
|
||||||
version: 2.2.1
|
version: 2.2.1
|
||||||
@@ -3354,7 +3360,7 @@ packages:
|
|||||||
dependencies:
|
dependencies:
|
||||||
'@unhead/dom': 0.5.1
|
'@unhead/dom': 0.5.1
|
||||||
'@unhead/schema': 0.5.1
|
'@unhead/schema': 0.5.1
|
||||||
'@vueuse/shared': 10.8.0(vue@3.3.4)
|
'@vueuse/shared': 10.11.1(vue@3.3.4)
|
||||||
unhead: 0.5.1
|
unhead: 0.5.1
|
||||||
vue: 3.3.4
|
vue: 3.3.4
|
||||||
transitivePeerDependencies:
|
transitivePeerDependencies:
|
||||||
@@ -3987,19 +3993,19 @@ packages:
|
|||||||
- vue
|
- vue
|
||||||
dev: false
|
dev: false
|
||||||
|
|
||||||
/@vueuse/shared@10.3.0(vue@3.3.4):
|
/@vueuse/shared@10.11.1(vue@3.3.4):
|
||||||
resolution: {integrity: sha512-kGqCTEuFPMK4+fNWy6dUOiYmxGcUbtznMwBZLC1PubidF4VZY05B+Oht7Jh7/6x4VOWGpvu3R37WHi81cKpiqg==}
|
resolution: {integrity: sha512-LHpC8711VFZlDaYUXEBbFBCQ7GS3dVU9mjOhhMhXP6txTV4EhYQg/KGnQuvt/sPAtoUKq7VVUnL6mVtFoL42sA==}
|
||||||
dependencies:
|
dependencies:
|
||||||
vue-demi: 0.14.5(vue@3.3.4)
|
vue-demi: 0.14.10(vue@3.3.4)
|
||||||
transitivePeerDependencies:
|
transitivePeerDependencies:
|
||||||
- '@vue/composition-api'
|
- '@vue/composition-api'
|
||||||
- vue
|
- vue
|
||||||
dev: false
|
dev: false
|
||||||
|
|
||||||
/@vueuse/shared@10.8.0(vue@3.3.4):
|
/@vueuse/shared@10.3.0(vue@3.3.4):
|
||||||
resolution: {integrity: sha512-dUdy6zwHhULGxmr9YUg8e+EnB39gcM4Fe2oKBSrh3cOsV30JcMPtsyuspgFCUo5xxFNaeMf/W2yyKfST7Bg8oQ==}
|
resolution: {integrity: sha512-kGqCTEuFPMK4+fNWy6dUOiYmxGcUbtznMwBZLC1PubidF4VZY05B+Oht7Jh7/6x4VOWGpvu3R37WHi81cKpiqg==}
|
||||||
dependencies:
|
dependencies:
|
||||||
vue-demi: 0.14.7(vue@3.3.4)
|
vue-demi: 0.14.5(vue@3.3.4)
|
||||||
transitivePeerDependencies:
|
transitivePeerDependencies:
|
||||||
- '@vue/composition-api'
|
- '@vue/composition-api'
|
||||||
- vue
|
- vue
|
||||||
@@ -4973,6 +4979,12 @@ packages:
|
|||||||
/electron-to-chromium@1.4.572:
|
/electron-to-chromium@1.4.572:
|
||||||
resolution: {integrity: sha512-RlFobl4D3ieetbnR+2EpxdzFl9h0RAJkPK3pfiwMug2nhBin2ZCsGIAJWdpNniLz43sgXam/CgipOmvTA+rUiA==}
|
resolution: {integrity: sha512-RlFobl4D3ieetbnR+2EpxdzFl9h0RAJkPK3pfiwMug2nhBin2ZCsGIAJWdpNniLz43sgXam/CgipOmvTA+rUiA==}
|
||||||
|
|
||||||
|
/email-normalizer@1.0.0:
|
||||||
|
resolution: {integrity: sha512-wZYuuMtL4kUOmg/TPtCrf9hAZjbFq+FcjWA85Z5nr2lGllRnWJPxCJw3gy4Cx+adMoyVw4VJfGGvt/OHgIW+qg==}
|
||||||
|
dependencies:
|
||||||
|
typescript: 5.5.4
|
||||||
|
dev: false
|
||||||
|
|
||||||
/emitter-component@1.1.1:
|
/emitter-component@1.1.1:
|
||||||
resolution: {integrity: sha512-G+mpdiAySMuB7kesVRLuyvYRqDmshB7ReKEVuyBPkzQlmiDiLrt7hHHIy4Aff552bgknVN7B2/d3lzhGO5dvpQ==}
|
resolution: {integrity: sha512-G+mpdiAySMuB7kesVRLuyvYRqDmshB7ReKEVuyBPkzQlmiDiLrt7hHHIy4Aff552bgknVN7B2/d3lzhGO5dvpQ==}
|
||||||
dev: false
|
dev: false
|
||||||
@@ -7959,8 +7971,6 @@ packages:
|
|||||||
/sax@1.2.4:
|
/sax@1.2.4:
|
||||||
resolution: {integrity: sha512-NqVDv9TpANUjFm0N8uM5GxL36UgKi9/atZw+x7YFnQ8ckwFGKrl4xX4yWtrey3UJm5nP1kUbnYgLopqWNSRhWw==}
|
resolution: {integrity: sha512-NqVDv9TpANUjFm0N8uM5GxL36UgKi9/atZw+x7YFnQ8ckwFGKrl4xX4yWtrey3UJm5nP1kUbnYgLopqWNSRhWw==}
|
||||||
requiresBuild: true
|
requiresBuild: true
|
||||||
dev: true
|
|
||||||
optional: true
|
|
||||||
|
|
||||||
/saxes@6.0.0:
|
/saxes@6.0.0:
|
||||||
resolution: {integrity: sha512-xAg7SOnEhrm5zI3puOOKyy1OMcMlIJZYNJY7xLBwSze0UjhPLnWfj2GF2EpT0jmzaJKIWKHLsaSSajf35bcYnA==}
|
resolution: {integrity: sha512-xAg7SOnEhrm5zI3puOOKyy1OMcMlIJZYNJY7xLBwSze0UjhPLnWfj2GF2EpT0jmzaJKIWKHLsaSSajf35bcYnA==}
|
||||||
@@ -8603,6 +8613,12 @@ packages:
|
|||||||
engines: {node: '>=14.17'}
|
engines: {node: '>=14.17'}
|
||||||
hasBin: true
|
hasBin: true
|
||||||
|
|
||||||
|
/typescript@5.5.4:
|
||||||
|
resolution: {integrity: sha512-Mtq29sKDAEYP7aljRgtPOpTvOfbwRWlS6dPRzwjdE+C0R4brX/GUyhHSecbHMFLNBLcJIPt9nl9yG5TZ1weH+Q==}
|
||||||
|
engines: {node: '>=14.17'}
|
||||||
|
hasBin: true
|
||||||
|
dev: false
|
||||||
|
|
||||||
/ua-parser-js@1.0.35:
|
/ua-parser-js@1.0.35:
|
||||||
resolution: {integrity: sha512-fKnGuqmTBnIE+/KXSzCn4db8RTigUzw1AN0DmdU6hJovUTbYJKyqj+8Mt1c4VfRDnOVJnENmfYkIPZ946UrSAA==}
|
resolution: {integrity: sha512-fKnGuqmTBnIE+/KXSzCn4db8RTigUzw1AN0DmdU6hJovUTbYJKyqj+8Mt1c4VfRDnOVJnENmfYkIPZ946UrSAA==}
|
||||||
dev: false
|
dev: false
|
||||||
@@ -9143,8 +9159,8 @@ packages:
|
|||||||
vue: 3.3.4
|
vue: 3.3.4
|
||||||
dev: false
|
dev: false
|
||||||
|
|
||||||
/vue-demi@0.14.5(vue@3.3.4):
|
/vue-demi@0.14.10(vue@3.3.4):
|
||||||
resolution: {integrity: sha512-o9NUVpl/YlsGJ7t+xuqJKx8EBGf1quRhCiT6D/J0pfwmk9zUwYkC7yrF4SZCe6fETvSM3UNL2edcbYrSyc4QHA==}
|
resolution: {integrity: sha512-nMZBOwuzabUO0nLgIcc6rycZEebF6eeUfaiQx9+WSk8e29IbLvPU9feI6tqW4kTo3hvoYAJkMh8n8D0fuISphg==}
|
||||||
engines: {node: '>=12'}
|
engines: {node: '>=12'}
|
||||||
hasBin: true
|
hasBin: true
|
||||||
requiresBuild: true
|
requiresBuild: true
|
||||||
@@ -9158,8 +9174,8 @@ packages:
|
|||||||
vue: 3.3.4
|
vue: 3.3.4
|
||||||
dev: false
|
dev: false
|
||||||
|
|
||||||
/vue-demi@0.14.7(vue@3.3.4):
|
/vue-demi@0.14.5(vue@3.3.4):
|
||||||
resolution: {integrity: sha512-EOG8KXDQNwkJILkx/gPcoL/7vH+hORoBaKgGe+6W7VFMvCYJfmF2dGbvgDroVnI8LU7/kTu8mbjRZGBU1z9NTA==}
|
resolution: {integrity: sha512-o9NUVpl/YlsGJ7t+xuqJKx8EBGf1quRhCiT6D/J0pfwmk9zUwYkC7yrF4SZCe6fETvSM3UNL2edcbYrSyc4QHA==}
|
||||||
engines: {node: '>=12'}
|
engines: {node: '>=12'}
|
||||||
hasBin: true
|
hasBin: true
|
||||||
requiresBuild: true
|
requiresBuild: true
|
||||||
@@ -9449,6 +9465,7 @@ packages:
|
|||||||
|
|
||||||
/workbox-google-analytics@7.0.0:
|
/workbox-google-analytics@7.0.0:
|
||||||
resolution: {integrity: sha512-MEYM1JTn/qiC3DbpvP2BVhyIH+dV/5BjHk756u9VbwuAhu0QHyKscTnisQuz21lfRpOwiS9z4XdqeVAKol0bzg==}
|
resolution: {integrity: sha512-MEYM1JTn/qiC3DbpvP2BVhyIH+dV/5BjHk756u9VbwuAhu0QHyKscTnisQuz21lfRpOwiS9z4XdqeVAKol0bzg==}
|
||||||
|
deprecated: It is not compatible with newer versions of GA starting with v4, as long as you are using GAv3 it should be ok, but the package is not longer being maintained
|
||||||
dependencies:
|
dependencies:
|
||||||
workbox-background-sync: 7.0.0
|
workbox-background-sync: 7.0.0
|
||||||
workbox-core: 7.0.0
|
workbox-core: 7.0.0
|
||||||
@@ -9549,6 +9566,13 @@ packages:
|
|||||||
xml-parser-xo: 4.0.5
|
xml-parser-xo: 4.0.5
|
||||||
dev: false
|
dev: false
|
||||||
|
|
||||||
|
/xml-js@1.6.11:
|
||||||
|
resolution: {integrity: sha512-7rVi2KMfwfWFl+GpPg6m80IVMWXLRjO+PxTq7V2CDhoGak0wzYzFgUY2m4XJ47OGdXd8eLE8EmwfAmdjw7lC1g==}
|
||||||
|
hasBin: true
|
||||||
|
dependencies:
|
||||||
|
sax: 1.2.4
|
||||||
|
dev: false
|
||||||
|
|
||||||
/xml-name-validator@4.0.0:
|
/xml-name-validator@4.0.0:
|
||||||
resolution: {integrity: sha512-ICP2e+jsHvAj2E2lIHxa5tjXRlKDJo4IdvPvCXbXQGdzSfmSpNVyIKMvoZHjDY9DP0zV17iI85o90vRFXNccRw==}
|
resolution: {integrity: sha512-ICP2e+jsHvAj2E2lIHxa5tjXRlKDJo4IdvPvCXbXQGdzSfmSpNVyIKMvoZHjDY9DP0zV17iI85o90vRFXNccRw==}
|
||||||
engines: {node: '>=12'}
|
engines: {node: '>=12'}
|
||||||
|
|||||||
@@ -9,7 +9,7 @@ const theme = useThemeVars();
|
|||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<router-link :to="tool.path" class="it-tool-link decoration-none">
|
<router-link :to="tool.path" class="decoration-none">
|
||||||
<c-card class="h-full transition transition-duration-0.5s !border-2px !hover:border-primary">
|
<c-card class="h-full transition transition-duration-0.5s !border-2px !hover:border-primary">
|
||||||
<div flex items-center justify-between>
|
<div flex items-center justify-between>
|
||||||
<n-icon class="text-neutral-400 dark:text-neutral-600" size="40" :component="tool.icon" />
|
<n-icon class="text-neutral-400 dark:text-neutral-600" size="40" :component="tool.icon" />
|
||||||
|
|||||||
@@ -0,0 +1,21 @@
|
|||||||
|
import _ from 'lodash';
|
||||||
|
|
||||||
|
function useDebouncedRef<T>(initialValue: T, delay: number, immediate: boolean = false) {
|
||||||
|
const state = ref(initialValue);
|
||||||
|
const debouncedRef = customRef((track, trigger) => ({
|
||||||
|
get() {
|
||||||
|
track();
|
||||||
|
return state.value;
|
||||||
|
},
|
||||||
|
set: _.debounce(
|
||||||
|
(value) => {
|
||||||
|
state.value = value;
|
||||||
|
trigger();
|
||||||
|
},
|
||||||
|
delay,
|
||||||
|
{ leading: immediate },
|
||||||
|
),
|
||||||
|
}));
|
||||||
|
return debouncedRef;
|
||||||
|
}
|
||||||
|
export default useDebouncedRef;
|
||||||
@@ -1,7 +1,8 @@
|
|||||||
import { useRouteQuery } from '@vueuse/router';
|
import { useRouteQuery } from '@vueuse/router';
|
||||||
import { computed } from 'vue';
|
import { computed } from 'vue';
|
||||||
|
import { useStorage } from '@vueuse/core';
|
||||||
|
|
||||||
export { useQueryParam };
|
export { useQueryParam, useQueryParamOrStorage };
|
||||||
|
|
||||||
const transformers = {
|
const transformers = {
|
||||||
number: {
|
number: {
|
||||||
@@ -16,6 +17,12 @@ const transformers = {
|
|||||||
fromQuery: (value: string) => value.toLowerCase() === 'true',
|
fromQuery: (value: string) => value.toLowerCase() === 'true',
|
||||||
toQuery: (value: boolean) => (value ? 'true' : 'false'),
|
toQuery: (value: boolean) => (value ? 'true' : 'false'),
|
||||||
},
|
},
|
||||||
|
object: {
|
||||||
|
fromQuery: (value: string) => {
|
||||||
|
return JSON.parse(value);
|
||||||
|
},
|
||||||
|
toQuery: (value: object) => JSON.stringify(value),
|
||||||
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
function useQueryParam<T>({ name, defaultValue }: { name: string; defaultValue: T }) {
|
function useQueryParam<T>({ name, defaultValue }: { name: string; defaultValue: T }) {
|
||||||
@@ -33,3 +40,27 @@ function useQueryParam<T>({ name, defaultValue }: { name: string; defaultValue:
|
|||||||
},
|
},
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function useQueryParamOrStorage<T>({ name, storageName, defaultValue }: { name: string; storageName: string; defaultValue: T }) {
|
||||||
|
const type = typeof defaultValue;
|
||||||
|
const transformer = transformers[type as keyof typeof transformers] ?? transformers.string;
|
||||||
|
|
||||||
|
const storageRef = useStorage(storageName, defaultValue);
|
||||||
|
const proxyDefaultValue = transformer.toQuery(defaultValue as never);
|
||||||
|
const proxy = useRouteQuery(name, proxyDefaultValue);
|
||||||
|
|
||||||
|
const r = ref(defaultValue);
|
||||||
|
|
||||||
|
watch(r,
|
||||||
|
(value) => {
|
||||||
|
proxy.value = transformer.toQuery(value as never);
|
||||||
|
storageRef.value = value as never;
|
||||||
|
},
|
||||||
|
{ deep: true });
|
||||||
|
|
||||||
|
r.value = (proxy.value && proxy.value !== proxyDefaultValue
|
||||||
|
? transformer.fromQuery(proxy.value) as unknown as T
|
||||||
|
: storageRef.value as T) as never;
|
||||||
|
|
||||||
|
return r;
|
||||||
|
}
|
||||||
@@ -1,46 +0,0 @@
|
|||||||
import { expect, test } from '@playwright/test';
|
|
||||||
|
|
||||||
const ignoredHrefs = new Set(['/camera-recorder']);
|
|
||||||
|
|
||||||
test.describe('IT Tool', () => {
|
|
||||||
test('Loads all tools correctly', async ({ page }) => {
|
|
||||||
test.slow();
|
|
||||||
|
|
||||||
const allTools: string[] = [];
|
|
||||||
|
|
||||||
await page.goto('/');
|
|
||||||
await page.waitForSelector('.it-tool-link');
|
|
||||||
const allLinks = await page.locator('.it-tool-link').all();
|
|
||||||
for (const a of allLinks) {
|
|
||||||
allTools.push((await a.getAttribute('href')) || '/');
|
|
||||||
}
|
|
||||||
|
|
||||||
expect(allTools.length).toBeGreaterThan(0);
|
|
||||||
|
|
||||||
const errors: Array<Error> = [];
|
|
||||||
|
|
||||||
page.on('pageerror', (error) => {
|
|
||||||
// ignore errors related to physical devices (ie camera recorder)
|
|
||||||
if (error.message.match(/Requested device not found/)) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
errors.push(error);
|
|
||||||
});
|
|
||||||
|
|
||||||
for (const toolHref of allTools) {
|
|
||||||
if (ignoredHrefs.has(toolHref)) {
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
await test.step(toolHref, async () => {
|
|
||||||
errors.splice(0, errors.length);
|
|
||||||
|
|
||||||
await page.goto(toolHref);
|
|
||||||
await page.waitForSelector('.tool-header');
|
|
||||||
|
|
||||||
await expect(page).toHaveTitle(/.+ - IT Tools/);
|
|
||||||
|
|
||||||
expect(errors, `${toolHref} to have no JS error`).toHaveLength(0);
|
|
||||||
});
|
|
||||||
}
|
|
||||||
});
|
|
||||||
});
|
|
||||||
@@ -0,0 +1,65 @@
|
|||||||
|
<script setup lang="ts">
|
||||||
|
import { normalizeEmail } from 'email-normalizer';
|
||||||
|
import { withDefaultOnError } from '@/utils/defaults';
|
||||||
|
import { useCopy } from '@/composable/copy';
|
||||||
|
|
||||||
|
const emails = ref('');
|
||||||
|
const normalizedEmails = computed(() => {
|
||||||
|
if (!emails.value) {
|
||||||
|
return '';
|
||||||
|
}
|
||||||
|
|
||||||
|
return emails.value
|
||||||
|
.split('\n')
|
||||||
|
.map((email) => {
|
||||||
|
return withDefaultOnError(() => normalizeEmail({ email }), `Unable to parse email: ${email}`);
|
||||||
|
})
|
||||||
|
.join('\n');
|
||||||
|
});
|
||||||
|
|
||||||
|
const { copy } = useCopy({ source: normalizedEmails, text: 'Normalized emails copied to the clipboard', createToast: true });
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<template>
|
||||||
|
<div>
|
||||||
|
<div class="mb-2">
|
||||||
|
Raw emails to normalize:
|
||||||
|
</div>
|
||||||
|
<c-input-text
|
||||||
|
v-model:value="emails"
|
||||||
|
placeholder="Put your emails here (one per line)..."
|
||||||
|
rows="3"
|
||||||
|
multiline
|
||||||
|
autocomplete="off"
|
||||||
|
autocorrect="off"
|
||||||
|
autocapitalize="off"
|
||||||
|
spellcheck="false"
|
||||||
|
autofocus
|
||||||
|
monospace
|
||||||
|
/>
|
||||||
|
|
||||||
|
<div class="mb-2 mt-4">
|
||||||
|
Normalized emails:
|
||||||
|
</div>
|
||||||
|
<c-input-text
|
||||||
|
:value="normalizedEmails"
|
||||||
|
placeholder="Normalized emails will appear here..."
|
||||||
|
rows="3"
|
||||||
|
autocomplete="off"
|
||||||
|
autocorrect="off"
|
||||||
|
autocapitalize="off"
|
||||||
|
spellcheck="false"
|
||||||
|
multiline
|
||||||
|
readonly
|
||||||
|
monospace
|
||||||
|
/>
|
||||||
|
<div class="mt-4 flex justify-center gap-2">
|
||||||
|
<c-button @click="emails = ''">
|
||||||
|
Clear emails
|
||||||
|
</c-button>
|
||||||
|
<c-button :disabled="!normalizedEmails" @click="copy()">
|
||||||
|
Copy normalized emails
|
||||||
|
</c-button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
@@ -0,0 +1,12 @@
|
|||||||
|
import { Mail } from '@vicons/tabler';
|
||||||
|
import { defineTool } from '../tool';
|
||||||
|
|
||||||
|
export const tool = defineTool({
|
||||||
|
name: 'Email normalizer',
|
||||||
|
path: '/email-normalizer',
|
||||||
|
description: 'Normalize email addresses to a standard format for easier comparison. Useful for deduplication and data cleaning.',
|
||||||
|
keywords: ['email', 'normalizer'],
|
||||||
|
component: () => import('./email-normalizer.vue'),
|
||||||
|
icon: Mail,
|
||||||
|
createdAt: new Date('2024-08-15'),
|
||||||
|
});
|
||||||
@@ -4,6 +4,7 @@ import emojiKeywords from 'emojilib';
|
|||||||
import _ from 'lodash';
|
import _ from 'lodash';
|
||||||
import type { EmojiInfo } from './emoji.types';
|
import type { EmojiInfo } from './emoji.types';
|
||||||
import { useFuzzySearch } from '@/composable/fuzzySearch';
|
import { useFuzzySearch } from '@/composable/fuzzySearch';
|
||||||
|
import useDebouncedRef from '@/composable/debouncedref';
|
||||||
|
|
||||||
const escapeUnicode = ({ emoji }: { emoji: string }) => emoji.split('').map(unit => `\\u${unit.charCodeAt(0).toString(16).padStart(4, '0')}`).join('');
|
const escapeUnicode = ({ emoji }: { emoji: string }) => emoji.split('').map(unit => `\\u${unit.charCodeAt(0).toString(16).padStart(4, '0')}`).join('');
|
||||||
const getEmojiCodePoints = ({ emoji }: { emoji: string }) => emoji.codePointAt(0) ? `0x${emoji.codePointAt(0)?.toString(16)}` : undefined;
|
const getEmojiCodePoints = ({ emoji }: { emoji: string }) => emoji.codePointAt(0) ? `0x${emoji.codePointAt(0)?.toString(16)}` : undefined;
|
||||||
@@ -23,7 +24,7 @@ const emojisGroups: { emojiInfos: EmojiInfo[]; group: string }[] = _
|
|||||||
.map((emojiInfos, group) => ({ group, emojiInfos }))
|
.map((emojiInfos, group) => ({ group, emojiInfos }))
|
||||||
.value();
|
.value();
|
||||||
|
|
||||||
const searchQuery = ref('');
|
const searchQuery = useDebouncedRef('', 500);
|
||||||
|
|
||||||
const { searchResult } = useFuzzySearch({
|
const { searchResult } = useFuzzySearch({
|
||||||
search: searchQuery,
|
search: searchQuery,
|
||||||
|
|||||||
+21
-1
@@ -1,11 +1,15 @@
|
|||||||
import { tool as base64FileConverter } from './base64-file-converter';
|
import { tool as base64FileConverter } from './base64-file-converter';
|
||||||
import { tool as base64StringConverter } from './base64-string-converter';
|
import { tool as base64StringConverter } from './base64-string-converter';
|
||||||
import { tool as basicAuthGenerator } from './basic-auth-generator';
|
import { tool as basicAuthGenerator } from './basic-auth-generator';
|
||||||
|
import { tool as emailNormalizer } from './email-normalizer';
|
||||||
|
import { tool as pinCodeGenerator } from './pin-code-generator';
|
||||||
|
|
||||||
import { tool as asciiTextDrawer } from './ascii-text-drawer';
|
import { tool as asciiTextDrawer } from './ascii-text-drawer';
|
||||||
|
|
||||||
import { tool as textToUnicode } from './text-to-unicode';
|
import { tool as textToUnicode } from './text-to-unicode';
|
||||||
import { tool as safelinkDecoder } from './safelink-decoder';
|
import { tool as safelinkDecoder } from './safelink-decoder';
|
||||||
|
import { tool as xmlToJson } from './xml-to-json';
|
||||||
|
import { tool as jsonToXml } from './json-to-xml';
|
||||||
import { tool as pdfSignatureChecker } from './pdf-signature-checker';
|
import { tool as pdfSignatureChecker } from './pdf-signature-checker';
|
||||||
import { tool as numeronymGenerator } from './numeronym-generator';
|
import { tool as numeronymGenerator } from './numeronym-generator';
|
||||||
import { tool as macAddressGenerator } from './mac-address-generator';
|
import { tool as macAddressGenerator } from './mac-address-generator';
|
||||||
@@ -85,7 +89,20 @@ import { tool as yamlViewer } from './yaml-viewer';
|
|||||||
export const toolsByCategory: ToolCategory[] = [
|
export const toolsByCategory: ToolCategory[] = [
|
||||||
{
|
{
|
||||||
name: 'Crypto',
|
name: 'Crypto',
|
||||||
components: [tokenGenerator, hashText, bcrypt, uuidGenerator, ulidGenerator, cypher, bip39, hmacGenerator, rsaKeyPairGenerator, passwordStrengthAnalyser, pdfSignatureChecker],
|
components: [
|
||||||
|
tokenGenerator,
|
||||||
|
pinCodeGenerator,
|
||||||
|
hashText,
|
||||||
|
bcrypt,
|
||||||
|
uuidGenerator,
|
||||||
|
ulidGenerator,
|
||||||
|
cypher,
|
||||||
|
bip39,
|
||||||
|
hmacGenerator,
|
||||||
|
rsaKeyPairGenerator,
|
||||||
|
passwordStrengthAnalyser,
|
||||||
|
pdfSignatureChecker,
|
||||||
|
],
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: 'Converter',
|
name: 'Converter',
|
||||||
@@ -107,6 +124,8 @@ export const toolsByCategory: ToolCategory[] = [
|
|||||||
listConverter,
|
listConverter,
|
||||||
tomlToJson,
|
tomlToJson,
|
||||||
tomlToYaml,
|
tomlToYaml,
|
||||||
|
xmlToJson,
|
||||||
|
jsonToXml,
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -148,6 +167,7 @@ export const toolsByCategory: ToolCategory[] = [
|
|||||||
dockerRunToDockerComposeConverter,
|
dockerRunToDockerComposeConverter,
|
||||||
xmlFormatter,
|
xmlFormatter,
|
||||||
yamlViewer,
|
yamlViewer,
|
||||||
|
emailNormalizer,
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -0,0 +1,12 @@
|
|||||||
|
import { Braces } from '@vicons/tabler';
|
||||||
|
import { defineTool } from '../tool';
|
||||||
|
|
||||||
|
export const tool = defineTool({
|
||||||
|
name: 'JSON to XML',
|
||||||
|
path: '/json-to-xml',
|
||||||
|
description: 'Convert JSON to XML',
|
||||||
|
keywords: ['json', 'xml'],
|
||||||
|
component: () => import('./json-to-xml.vue'),
|
||||||
|
icon: Braces,
|
||||||
|
createdAt: new Date('2024-08-09'),
|
||||||
|
});
|
||||||
@@ -0,0 +1,32 @@
|
|||||||
|
<script setup lang="ts">
|
||||||
|
import convert from 'xml-js';
|
||||||
|
import JSON5 from 'json5';
|
||||||
|
import { withDefaultOnError } from '@/utils/defaults';
|
||||||
|
import type { UseValidationRule } from '@/composable/validation';
|
||||||
|
|
||||||
|
const defaultValue = '{"a":{"_attributes":{"x":"1.234","y":"It\'s"}}}';
|
||||||
|
function transformer(value: string) {
|
||||||
|
return withDefaultOnError(() => {
|
||||||
|
return convert.js2xml(JSON5.parse(value), { compact: true });
|
||||||
|
}, '');
|
||||||
|
}
|
||||||
|
|
||||||
|
const rules: UseValidationRule<string>[] = [
|
||||||
|
{
|
||||||
|
validator: (v: string) => v === '' || JSON5.parse(v),
|
||||||
|
message: 'Provided JSON is not valid.',
|
||||||
|
},
|
||||||
|
];
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<template>
|
||||||
|
<format-transformer
|
||||||
|
input-label="Your JSON content"
|
||||||
|
:input-default="defaultValue"
|
||||||
|
input-placeholder="Paste your JSON content here..."
|
||||||
|
output-label="Converted XML"
|
||||||
|
output-language="xml"
|
||||||
|
:transformer="transformer"
|
||||||
|
:input-validation-rules="rules"
|
||||||
|
/>
|
||||||
|
</template>
|
||||||
@@ -2,6 +2,7 @@
|
|||||||
import { generateLoremIpsum } from './lorem-ipsum-generator.service';
|
import { generateLoremIpsum } from './lorem-ipsum-generator.service';
|
||||||
import { useCopy } from '@/composable/copy';
|
import { useCopy } from '@/composable/copy';
|
||||||
import { randIntFromInterval } from '@/utils/random';
|
import { randIntFromInterval } from '@/utils/random';
|
||||||
|
import { computedRefreshable } from '@/composable/computedRefreshable';
|
||||||
|
|
||||||
const paragraphs = ref(1);
|
const paragraphs = ref(1);
|
||||||
const sentences = ref([3, 8]);
|
const sentences = ref([3, 8]);
|
||||||
@@ -9,7 +10,7 @@ const words = ref([8, 15]);
|
|||||||
const startWithLoremIpsum = ref(true);
|
const startWithLoremIpsum = ref(true);
|
||||||
const asHTML = ref(false);
|
const asHTML = ref(false);
|
||||||
|
|
||||||
const loremIpsumText = computed(() =>
|
const [loremIpsumText, refreshLoremIpsum] = computedRefreshable(() =>
|
||||||
generateLoremIpsum({
|
generateLoremIpsum({
|
||||||
paragraphCount: paragraphs.value,
|
paragraphCount: paragraphs.value,
|
||||||
asHTML: asHTML.value,
|
asHTML: asHTML.value,
|
||||||
@@ -18,6 +19,7 @@ const loremIpsumText = computed(() =>
|
|||||||
startWithLoremIpsum: startWithLoremIpsum.value,
|
startWithLoremIpsum: startWithLoremIpsum.value,
|
||||||
}),
|
}),
|
||||||
);
|
);
|
||||||
|
|
||||||
const { copy } = useCopy({ source: loremIpsumText, text: 'Lorem ipsum copied to the clipboard' });
|
const { copy } = useCopy({ source: loremIpsumText, text: 'Lorem ipsum copied to the clipboard' });
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
@@ -41,10 +43,13 @@ const { copy } = useCopy({ source: loremIpsumText, text: 'Lorem ipsum copied to
|
|||||||
|
|
||||||
<c-input-text :value="loremIpsumText" multiline placeholder="Your lorem ipsum..." readonly mt-5 rows="5" />
|
<c-input-text :value="loremIpsumText" multiline placeholder="Your lorem ipsum..." readonly mt-5 rows="5" />
|
||||||
|
|
||||||
<div mt-5 flex justify-center>
|
<div mt-5 flex justify-center gap-3>
|
||||||
<c-button autofocus @click="copy()">
|
<c-button autofocus @click="copy()">
|
||||||
Copy
|
Copy
|
||||||
</c-button>
|
</c-button>
|
||||||
|
<c-button @click="refreshLoremIpsum">
|
||||||
|
Refresh
|
||||||
|
</c-button>
|
||||||
</div>
|
</div>
|
||||||
</c-card>
|
</c-card>
|
||||||
</template>
|
</template>
|
||||||
@@ -0,0 +1,12 @@
|
|||||||
|
import { FileDigit } from '@vicons/tabler';
|
||||||
|
import { defineTool } from '../tool';
|
||||||
|
|
||||||
|
export const tool = defineTool({
|
||||||
|
name: 'Pin Code Generator',
|
||||||
|
path: '/pin-code-generator',
|
||||||
|
description: 'Generate Unique PIN (digits) codes',
|
||||||
|
keywords: ['pin', 'code', 'digits', 'generator'],
|
||||||
|
component: () => import('./pin-code-generator.vue'),
|
||||||
|
icon: FileDigit,
|
||||||
|
createdAt: new Date('2024-08-15'),
|
||||||
|
});
|
||||||
@@ -0,0 +1,35 @@
|
|||||||
|
import { describe, expect, it } from 'vitest';
|
||||||
|
import { randomNumber } from './pin-code-generator.service';
|
||||||
|
|
||||||
|
describe('pin-code-generator', () => {
|
||||||
|
describe('randomNumber', () => {
|
||||||
|
it('should generate random pin code of given length', () => {
|
||||||
|
expect(randomNumber({
|
||||||
|
length: 10,
|
||||||
|
})).toHaveLength(10);
|
||||||
|
expect(randomNumber({
|
||||||
|
length: 4,
|
||||||
|
})).toHaveLength(4);
|
||||||
|
expect(randomNumber({
|
||||||
|
length: 25,
|
||||||
|
})).toHaveLength(25);
|
||||||
|
});
|
||||||
|
it('should generate random pin code without duplicate', () => {
|
||||||
|
const pin = randomNumber({
|
||||||
|
length: 10,
|
||||||
|
});
|
||||||
|
expect(pin).toHaveLength(10);
|
||||||
|
expect(pin.length).to.eq([...new Set(pin.split(''))].length);
|
||||||
|
});
|
||||||
|
|
||||||
|
it('should generate random pin code with duplicate', () => {
|
||||||
|
const pin = randomNumber({
|
||||||
|
length: 12,
|
||||||
|
});
|
||||||
|
const uniqueDigits = [...new Set(pin.split(''))];
|
||||||
|
expect(pin).toHaveLength(12);
|
||||||
|
expect(pin.length).to.greaterThan(uniqueDigits.length);
|
||||||
|
expect(uniqueDigits.length).to.lessThanOrEqual(10);
|
||||||
|
});
|
||||||
|
});
|
||||||
|
});
|
||||||
@@ -0,0 +1,22 @@
|
|||||||
|
export function randomNumber({
|
||||||
|
length,
|
||||||
|
repeatDigits = false,
|
||||||
|
}: {
|
||||||
|
length: number
|
||||||
|
repeatDigits?: boolean
|
||||||
|
}) {
|
||||||
|
const arr = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9];
|
||||||
|
const result: number[] = [];
|
||||||
|
const willRepeat = length > 10 || repeatDigits;
|
||||||
|
|
||||||
|
while (result.length < length) {
|
||||||
|
const random = Math.floor(Math.random() * 10); // NOSONAR
|
||||||
|
const num = arr[random];
|
||||||
|
if (!willRepeat && result.includes(num)) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
result.push(num);
|
||||||
|
}
|
||||||
|
|
||||||
|
return result.join('');
|
||||||
|
}
|
||||||
@@ -0,0 +1,67 @@
|
|||||||
|
<script setup lang="ts">
|
||||||
|
import { randomNumber } from './pin-code-generator.service';
|
||||||
|
import { useCopy } from '@/composable/copy';
|
||||||
|
import { useQueryParamOrStorage } from '@/composable/queryParams';
|
||||||
|
import { computedRefreshable } from '@/composable/computedRefreshable';
|
||||||
|
|
||||||
|
const count = useQueryParamOrStorage({ name: 'count', storageName: 'pin-generator:count', defaultValue: 1 });
|
||||||
|
const length = useQueryParamOrStorage({ name: 'length', storageName: 'pin-generator:length', defaultValue: 6 });
|
||||||
|
const repeat = useQueryParamOrStorage({ name: 'repeat', storageName: 'pin-generator:repeat', defaultValue: true });
|
||||||
|
|
||||||
|
const [pins, refreshPins] = computedRefreshable(() =>
|
||||||
|
Array.from({ length: count.value },
|
||||||
|
() => randomNumber({
|
||||||
|
length: length.value,
|
||||||
|
repeatDigits: repeat.value,
|
||||||
|
})).join('\n'),
|
||||||
|
);
|
||||||
|
|
||||||
|
const { copy } = useCopy({ source: pins, text: 'Pin code copied to clipboard!' });
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<template>
|
||||||
|
<div>
|
||||||
|
<c-card>
|
||||||
|
<n-form-item :label="`Number of digits (${length})`" label-placement="left">
|
||||||
|
<n-slider v-model:value="length" :step="1" :min="1" :max="512" mr-2 />
|
||||||
|
<n-input-number v-model:value="length" size="small" />
|
||||||
|
</n-form-item>
|
||||||
|
|
||||||
|
<n-form-item label="Allow repeated digits" label-placement="left">
|
||||||
|
<n-switch v-model:value="repeat" />
|
||||||
|
</n-form-item>
|
||||||
|
|
||||||
|
<n-form-item label="Number of PIN codes to generate" label-placement="left">
|
||||||
|
<n-input-number v-model:value="count" size="small" />
|
||||||
|
</n-form-item>
|
||||||
|
|
||||||
|
<c-input-text
|
||||||
|
v-model:value="pins"
|
||||||
|
multiline
|
||||||
|
placeholder="PIN codes..."
|
||||||
|
readonly
|
||||||
|
rows="3"
|
||||||
|
autosize
|
||||||
|
class="pin-code-display"
|
||||||
|
word-wrap
|
||||||
|
/>
|
||||||
|
|
||||||
|
<div mt-5 flex justify-center gap-3>
|
||||||
|
<c-button @click="copy()">
|
||||||
|
Copy
|
||||||
|
</c-button>
|
||||||
|
<c-button @click="refreshPins">
|
||||||
|
Refresh
|
||||||
|
</c-button>
|
||||||
|
</div>
|
||||||
|
</c-card>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<style scoped lang="less">
|
||||||
|
::v-deep(.pin-code-display) {
|
||||||
|
textarea {
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</style>
|
||||||
@@ -0,0 +1,12 @@
|
|||||||
|
import { Braces } from '@vicons/tabler';
|
||||||
|
import { defineTool } from '../tool';
|
||||||
|
|
||||||
|
export const tool = defineTool({
|
||||||
|
name: 'XML to JSON',
|
||||||
|
path: '/xml-to-json',
|
||||||
|
description: 'Convert XML to JSON',
|
||||||
|
keywords: ['xml', 'json'],
|
||||||
|
component: () => import('./xml-to-json.vue'),
|
||||||
|
icon: Braces,
|
||||||
|
createdAt: new Date('2024-08-09'),
|
||||||
|
});
|
||||||
@@ -0,0 +1,32 @@
|
|||||||
|
<script setup lang="ts">
|
||||||
|
import convert from 'xml-js';
|
||||||
|
import { isValidXML } from '../xml-formatter/xml-formatter.service';
|
||||||
|
import { withDefaultOnError } from '@/utils/defaults';
|
||||||
|
import type { UseValidationRule } from '@/composable/validation';
|
||||||
|
|
||||||
|
const defaultValue = '<a x="1.234" y="It\'s"/>';
|
||||||
|
function transformer(value: string) {
|
||||||
|
return withDefaultOnError(() => {
|
||||||
|
return JSON.stringify(convert.xml2js(value, { compact: true }), null, 2);
|
||||||
|
}, '');
|
||||||
|
}
|
||||||
|
|
||||||
|
const rules: UseValidationRule<string>[] = [
|
||||||
|
{
|
||||||
|
validator: isValidXML,
|
||||||
|
message: 'Provided XML is not valid.',
|
||||||
|
},
|
||||||
|
];
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<template>
|
||||||
|
<format-transformer
|
||||||
|
input-label="Your XML content"
|
||||||
|
:input-default="defaultValue"
|
||||||
|
input-placeholder="Paste your XML content here..."
|
||||||
|
output-label="Converted JSON"
|
||||||
|
output-language="json"
|
||||||
|
:transformer="transformer"
|
||||||
|
:input-validation-rules="rules"
|
||||||
|
/>
|
||||||
|
</template>
|
||||||
Reference in new issue
Block a user