diff --git a/package.json b/package.json index b768d14d..36d95a74 100644 --- a/package.json +++ b/package.json @@ -261,6 +261,8 @@ "tesseract.js": "^5.1.1", "text-encoding-utf-8": "^1.0.2", "tidy-url": "^1.18.3", + "to-double-quotes": "^4.0.0", + "to-single-quotes": "^4.0.0", "turndown": "^7.2.0", "ua-parser-js": "^2.0.1", "ulid": "^2.3.0", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 6875efd8..31d332bf 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -680,6 +680,12 @@ dependencies: tidy-url: specifier: ^1.18.3 version: 1.18.3 + to-double-quotes: + specifier: ^4.0.0 + version: 4.0.0 + to-single-quotes: + specifier: ^4.0.0 + version: 4.0.0 turndown: specifier: ^7.2.0 version: 7.2.0 @@ -17143,6 +17149,13 @@ packages: hasBin: true dev: false + /to-double-quotes@4.0.0: + resolution: {integrity: sha512-frEcC+DRPpFrbEfUS2IwDKu2Pv/jjV1hcQGUjQvLhnv9zJlhMCXgrwODmhM1wlvfBik3GHOtyvm4WoZpKylL2Q==} + engines: {node: '>=12'} + dependencies: + to-single-quotes: 3.0.0 + dev: false + /to-fast-properties@2.0.0: resolution: {integrity: sha512-/OaKK0xYrs3DmxRYqL/yDc+FxFUVYhDlXMhRmv3z915w2HF1tnN1omB354j8VUGO/hbRzyD6Y3sA7v7GS/ceog==} engines: {node: '>=4'} @@ -17153,6 +17166,16 @@ packages: dependencies: is-number: 7.0.0 + /to-single-quotes@3.0.0: + resolution: {integrity: sha512-XdY9d95LLY+6yPI34vzUtI9KVSlfUM6RQIrLvislvD/rwYgjIHgKZsjiqjxJsWwPATEqXLgb1fM0Zy5x5rvPxA==} + engines: {node: '>=4'} + dev: false + + /to-single-quotes@4.0.0: + resolution: {integrity: sha512-sMi8lbpy+CIqZUb2Q/ZjhChlg+2B7ohuLaKYy0SsOqaAp8Yky2YT0JgbBTPqOi/rOtEMBcEFyeYM4QhHUbsLQg==} + engines: {node: '>=12'} + dev: false + /to-through@3.0.0: resolution: {integrity: sha512-y8MN937s/HVhEoBU1SxfHC+wxCHkV1a9gW8eAdTadYh/bGyesZIVcbjI+mSpFbSVwQici/XjBjuUyri1dnXwBw==} engines: {node: '>=10.13.0'} diff --git a/src/tools/quote-converter/index.ts b/src/tools/quote-converter/index.ts new file mode 100644 index 00000000..686fa683 --- /dev/null +++ b/src/tools/quote-converter/index.ts @@ -0,0 +1,13 @@ +import { Quote } from '@vicons/tabler'; +import { defineTool } from '../tool'; + +export const tool = defineTool({ + name: 'Quote Converter', + path: '/quote-converter', + description: 'Convert quoted string from/to \' and "', + keywords: ['quote', 'converter'], + component: () => import('./quote-converter.vue'), + icon: Quote, + createdAt: new Date('2025-05-01'), + category: 'Development', +}); diff --git a/src/tools/quote-converter/quote-converter.vue b/src/tools/quote-converter/quote-converter.vue new file mode 100644 index 00000000..3fd2a894 --- /dev/null +++ b/src/tools/quote-converter/quote-converter.vue @@ -0,0 +1,26 @@ + + + diff --git a/src/tools/quote-converter/to-double-quotes.d.ts b/src/tools/quote-converter/to-double-quotes.d.ts new file mode 100644 index 00000000..75d4ebd4 --- /dev/null +++ b/src/tools/quote-converter/to-double-quotes.d.ts @@ -0,0 +1,3 @@ +declare module 'to-double-quotes' { + export default function convert(s: string): string; +} \ No newline at end of file diff --git a/src/tools/quote-converter/to-single-quotes.d.ts b/src/tools/quote-converter/to-single-quotes.d.ts new file mode 100644 index 00000000..a1e86f9b --- /dev/null +++ b/src/tools/quote-converter/to-single-quotes.d.ts @@ -0,0 +1,3 @@ +declare module 'to-single-quotes' { + export default function convert(s: string): string; +} \ No newline at end of file