From 29e01070aefac0f14a069e130294b5e7328c7ff8 Mon Sep 17 00:00:00 2001 From: sharevb Date: Sat, 3 Feb 2024 14:12:49 +0100 Subject: [PATCH] feat(new tool): ISBN Parser and Formatter ISBN Parser and Formatter --- components.d.ts | 4 +- package.json | 1 + pnpm-lock.yaml | 15 ++- src/tools/index.ts | 7 +- src/tools/isbn-validator-and-parser/index.ts | 12 +++ .../isbn-validator-and-parser.vue | 101 ++++++++++++++++++ 6 files changed, 133 insertions(+), 7 deletions(-) create mode 100644 src/tools/isbn-validator-and-parser/index.ts create mode 100644 src/tools/isbn-validator-and-parser/isbn-validator-and-parser.vue diff --git a/components.d.ts b/components.d.ts index d034fc78..e6f3bab9 100644 --- a/components.d.ts +++ b/components.d.ts @@ -91,7 +91,6 @@ declare module '@vue/runtime-core' { 'IconMdi:contentCopy': typeof import('~icons/mdi/content-copy')['default'] 'IconMdi:kettleSteamOutline': typeof import('~icons/mdi/kettle-steam-outline')['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'] IconMdiCamera: typeof import('~icons/mdi/camera')['default'] IconMdiChevronDown: typeof import('~icons/mdi/chevron-down')['default'] @@ -117,6 +116,7 @@ declare module '@vue/runtime-core' { Ipv4RangeExpander: typeof import('./src/tools/ipv4-range-expander/ipv4-range-expander.vue')['default'] Ipv4SubnetCalculator: typeof import('./src/tools/ipv4-subnet-calculator/ipv4-subnet-calculator.vue')['default'] Ipv6UlaGenerator: typeof import('./src/tools/ipv6-ula-generator/ipv6-ula-generator.vue')['default'] + IsbnValidatorAndParser: typeof import('./src/tools/isbn-validator-and-parser/isbn-validator-and-parser.vue')['default'] JsonDiff: typeof import('./src/tools/json-diff/json-diff.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'] @@ -171,8 +171,6 @@ declare module '@vue/runtime-core' { NTable: typeof import('naive-ui')['NTable'] NTag: typeof import('naive-ui')['NTag'] 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'] 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'] diff --git a/package.json b/package.json index e0148f87..fcc55c8d 100644 --- a/package.json +++ b/package.json @@ -62,6 +62,7 @@ "highlight.js": "^11.7.0", "iarna-toml-esm": "^3.0.5", "ibantools": "^4.3.3", + "isbn3": "^1.1.44", "json5": "^2.2.3", "jwt-decode": "^3.1.2", "libphonenumber-js": "^1.10.28", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index dfacabd4..9a901b9e 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -86,6 +86,9 @@ dependencies: ibantools: specifier: ^4.3.3 version: 4.3.3 + isbn3: + specifier: ^1.1.44 + version: 1.1.45 json5: specifier: ^2.2.3 version: 2.2.3 @@ -3374,7 +3377,7 @@ packages: dependencies: '@unhead/dom': 0.5.1 '@unhead/schema': 0.5.1 - '@vueuse/shared': 10.6.1(vue@3.3.4) + '@vueuse/shared': 10.7.2(vue@3.3.4) unhead: 0.5.1 vue: 3.3.4 transitivePeerDependencies: @@ -4016,8 +4019,8 @@ packages: - vue dev: false - /@vueuse/shared@10.6.1(vue@3.3.4): - resolution: {integrity: sha512-TECVDTIedFlL0NUfHWncf3zF9Gc4VfdxfQc8JFwoVZQmxpONhLxFrlm0eHQeidHj4rdTPL3KXJa0TZCk1wnc5Q==} + /@vueuse/shared@10.7.2(vue@3.3.4): + resolution: {integrity: sha512-qFbXoxS44pi2FkgFjPvF4h7c9oMDutpyBdcJdMYIMg9XyXli2meFMuaKn+UMgsClo//Th6+beeCgqweT/79BVA==} dependencies: vue-demi: 0.14.6(vue@3.3.4) transitivePeerDependencies: @@ -6452,6 +6455,12 @@ packages: resolution: {integrity: sha512-xHjhDr3cNBK0BzdUJSPXZntQUx/mwMS5Rw4A7lPJ90XGAO6ISP/ePDNuo0vhqOZU+UD5JoodwCAAoZQd3FeAKw==} dev: true + /isbn3@1.1.45: + resolution: {integrity: sha512-9oD3yItVFRlYhm/K6RI2K6f+Dti0unzG74X9I7D+xVKMK3TbRl2PMvnWgK6scKnvk4t0BZFyNIznX4H45RrwzQ==} + engines: {node: '>= 6.4.0'} + hasBin: true + dev: false + /isexe@2.0.0: resolution: {integrity: sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==} dev: true diff --git a/src/tools/index.ts b/src/tools/index.ts index 52bdf8e3..84dac4e9 100644 --- a/src/tools/index.ts +++ b/src/tools/index.ts @@ -75,6 +75,7 @@ import { tool as urlParser } from './url-parser'; import { tool as uuidGenerator } from './uuid-generator'; import { tool as macAddressLookup } from './mac-address-lookup'; import { tool as xmlFormatter } from './xml-formatter'; +import { tool as isbnValidatorAndParser } from './isbn-validator-and-parser'; export const toolsByCategory: ToolCategory[] = [ { @@ -159,7 +160,11 @@ export const toolsByCategory: ToolCategory[] = [ }, { name: 'Data', - components: [phoneParserAndFormatter, ibanValidatorAndParser], + components: [ + phoneParserAndFormatter, + ibanValidatorAndParser, + isbnValidatorAndParser, + ], }, ]; diff --git a/src/tools/isbn-validator-and-parser/index.ts b/src/tools/isbn-validator-and-parser/index.ts new file mode 100644 index 00000000..3782ac39 --- /dev/null +++ b/src/tools/isbn-validator-and-parser/index.ts @@ -0,0 +1,12 @@ +import { Books } from '@vicons/tabler'; +import { defineTool } from '../tool'; + +export const tool = defineTool({ + name: 'ISBN Validator and Parser', + path: '/isbn-validator-and-parser', + description: 'Parse, validate, format and get infos for an ISBN', + keywords: ['isbn', 'validator', 'parser', 'formatter'], + component: () => import('./isbn-validator-and-parser.vue'), + icon: Books, + createdAt: new Date('2024-01-10'), +}); diff --git a/src/tools/isbn-validator-and-parser/isbn-validator-and-parser.vue b/src/tools/isbn-validator-and-parser/isbn-validator-and-parser.vue new file mode 100644 index 00000000..23afff1e --- /dev/null +++ b/src/tools/isbn-validator-and-parser/isbn-validator-and-parser.vue @@ -0,0 +1,101 @@ + + +