From f117a74c7471991c9a345677187971b074e8af74 Mon Sep 17 00:00:00 2001 From: ShareVB Date: Sun, 22 Sep 2024 11:08:24 +0200 Subject: [PATCH 1/5] feat(new tool): List Comparaison Fix #817 --- components.d.ts | 4 + package.json | 2 + pnpm-lock.yaml | 330 +++++++++++++++++- src/tools/index.ts | 2 + src/tools/list-comparer/index.ts | 12 + .../list-comparer.service.test.ts | 97 +++++ .../list-comparer/list-comparer.service.ts | 33 ++ src/tools/list-comparer/list-comparer.vue | 89 +++++ 8 files changed, 560 insertions(+), 9 deletions(-) create mode 100644 src/tools/list-comparer/index.ts create mode 100644 src/tools/list-comparer/list-comparer.service.test.ts create mode 100644 src/tools/list-comparer/list-comparer.service.ts create mode 100644 src/tools/list-comparer/list-comparer.vue diff --git a/components.d.ts b/components.d.ts index 89f41f80..e0bf0db4 100644 --- a/components.d.ts +++ b/components.d.ts @@ -116,6 +116,7 @@ declare module '@vue/runtime-core' { JsonViewer: typeof import('./src/tools/json-viewer/json-viewer.vue')['default'] JwtParser: typeof import('./src/tools/jwt-parser/jwt-parser.vue')['default'] KeycodeInfo: typeof import('./src/tools/keycode-info/keycode-info.vue')['default'] + ListComparer: typeof import('./src/tools/list-comparer/list-comparer.vue')['default'] ListConverter: typeof import('./src/tools/list-converter/list-converter.vue')['default'] LocaleSelector: typeof import('./src/modules/i18n/components/locale-selector.vue')['default'] LoremIpsumGenerator: typeof import('./src/tools/lorem-ipsum-generator/lorem-ipsum-generator.vue')['default'] @@ -132,18 +133,21 @@ declare module '@vue/runtime-core' { NCode: typeof import('naive-ui')['NCode'] NCollapseTransition: typeof import('naive-ui')['NCollapseTransition'] NConfigProvider: typeof import('naive-ui')['NConfigProvider'] + NDivider: typeof import('naive-ui')['NDivider'] NEllipsis: typeof import('naive-ui')['NEllipsis'] NForm: typeof import('naive-ui')['NForm'] NFormItem: typeof import('naive-ui')['NFormItem'] NH1: typeof import('naive-ui')['NH1'] NH3: typeof import('naive-ui')['NH3'] NIcon: typeof import('naive-ui')['NIcon'] + NInput: typeof import('naive-ui')['NInput'] NInputNumber: typeof import('naive-ui')['NInputNumber'] NLayout: typeof import('naive-ui')['NLayout'] NLayoutSider: typeof import('naive-ui')['NLayoutSider'] NMenu: typeof import('naive-ui')['NMenu'] NScrollbar: typeof import('naive-ui')['NScrollbar'] NSlider: typeof import('naive-ui')['NSlider'] + NSpace: typeof import('naive-ui')['NSpace'] NSwitch: typeof import('naive-ui')['NSwitch'] 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'] diff --git a/package.json b/package.json index 6191f702..f3f000d4 100644 --- a/package.json +++ b/package.json @@ -47,6 +47,8 @@ "@vueuse/core": "^10.3.0", "@vueuse/head": "^1.0.0", "@vueuse/router": "^10.0.0", + "arr-diff": "^4.0.0", + "array-intersection": "^0.1.2", "bcryptjs": "^2.4.3", "change-case": "^4.1.2", "colord": "^2.9.3", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 3044541a..87f0a236 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -41,6 +41,12 @@ dependencies: '@vueuse/router': specifier: ^10.0.0 version: 10.0.0(vue-router@4.1.6)(vue@3.3.4) + arr-diff: + specifier: ^4.0.0 + version: 4.0.0 + array-intersection: + specifier: ^0.1.2 + version: 0.1.2 bcryptjs: specifier: ^2.4.3 version: 2.4.3 @@ -3360,7 +3366,7 @@ packages: dependencies: '@unhead/dom': 0.5.1 '@unhead/schema': 0.5.1 - '@vueuse/shared': 10.11.1(vue@3.3.4) + '@vueuse/shared': 11.1.0(vue@3.3.4) unhead: 0.5.1 vue: 3.3.4 transitivePeerDependencies: @@ -3993,19 +3999,19 @@ packages: - vue dev: false - /@vueuse/shared@10.11.1(vue@3.3.4): - resolution: {integrity: sha512-LHpC8711VFZlDaYUXEBbFBCQ7GS3dVU9mjOhhMhXP6txTV4EhYQg/KGnQuvt/sPAtoUKq7VVUnL6mVtFoL42sA==} + /@vueuse/shared@10.3.0(vue@3.3.4): + resolution: {integrity: sha512-kGqCTEuFPMK4+fNWy6dUOiYmxGcUbtznMwBZLC1PubidF4VZY05B+Oht7Jh7/6x4VOWGpvu3R37WHi81cKpiqg==} dependencies: - vue-demi: 0.14.10(vue@3.3.4) + vue-demi: 0.14.5(vue@3.3.4) transitivePeerDependencies: - '@vue/composition-api' - vue dev: false - /@vueuse/shared@10.3.0(vue@3.3.4): - resolution: {integrity: sha512-kGqCTEuFPMK4+fNWy6dUOiYmxGcUbtznMwBZLC1PubidF4VZY05B+Oht7Jh7/6x4VOWGpvu3R37WHi81cKpiqg==} + /@vueuse/shared@11.1.0(vue@3.3.4): + resolution: {integrity: sha512-YUtIpY122q7osj+zsNMFAfMTubGz0sn5QzE5gPzAIiCmtt2ha3uQUY1+JPyL4gRCTsLPX82Y9brNbo/aqlA91w==} dependencies: - vue-demi: 0.14.5(vue@3.3.4) + vue-demi: 0.14.10(vue@3.3.4) transitivePeerDependencies: - '@vue/composition-api' - vue @@ -4119,6 +4125,30 @@ packages: /argparse@2.0.1: resolution: {integrity: sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==} + /arr-diff@2.0.0: + resolution: {integrity: sha512-dtXTVMkh6VkEEA7OhXnN1Ecb8aAGFdZ1LFxtOCoqj4qkyOJMt7+qs6Ahdy6p/NQCPYsRSXXivhSB/J5E9jmYKA==} + engines: {node: '>=0.10.0'} + dependencies: + arr-flatten: 1.1.0 + dev: false + + /arr-diff@4.0.0: + resolution: {integrity: sha512-YVIQ82gZPGBebQV/a8dar4AitzCQs0jjXwMPZllpXMaGjXPYVUawSxQrRsjhjupyVxEvbHgUmIhKVlND+j02kA==} + engines: {node: '>=0.10.0'} + dev: false + + /arr-filter@1.1.2: + resolution: {integrity: sha512-A2BETWCqhsecSvCkWAeVBFLH6sXEUGASuzkpjL3GR1SlL/PWL6M3J8EAAld2Uubmh39tvkJTqC9LeLHCUKmFXA==} + engines: {node: '>=0.10.0'} + dependencies: + make-iterator: 1.0.1 + dev: false + + /arr-flatten@1.1.0: + resolution: {integrity: sha512-L3hKV5R/p5o81R7O02IGnwpDmkp6E982XhtbuwSe3O4qOtMMMtodicASA1Cny2U+aCXcNpml+m4dPsvsJ3jatg==} + engines: {node: '>=0.10.0'} + dev: false + /array-buffer-byte-length@1.0.0: resolution: {integrity: sha512-LPuwb2P+NrQw3XhxGc36+XSvuBPopovXYTR9Ew++Du9Yb/bx5AzBfrIsBoj0EZUifjQU+sHL21sseZ3jerWO/A==} dependencies: @@ -4126,11 +4156,39 @@ packages: is-array-buffer: 3.0.2 dev: true + /array-every@0.1.2: + resolution: {integrity: sha512-uBIplBaMD8veRNQGg3LzEOUA+apExik+c3dbXoGWYdoZMEsUNFXKjeWBFd49Xicl+GaD3c9xt1Y9qfeQYzu47Q==} + engines: {node: '>=0.10.0'} + dependencies: + make-iterator: 0.1.1 + dev: false + + /array-intersection@0.1.2: + resolution: {integrity: sha512-qSGjtrQwUgu22pN56D7MQ+e/AMZ+FZC2PUMyLR4b4M2N7+JfJAlQMRCnfWt9aB60TIOrtbq4NQ/G3P3MGY6Q+Q==} + engines: {node: '>=0.10.0'} + dependencies: + array-every: 0.1.2 + array-slice: 0.2.3 + array-unique: 0.2.1 + filter-array: 0.2.0 + index-of: 0.1.1 + dev: false + + /array-slice@0.2.3: + resolution: {integrity: sha512-rlVfZW/1Ph2SNySXwR9QYkChp8EkOEiTMO5Vwx60usw04i4nWemkm9RXmQqgkQFaLHsqLuADvjp6IfgL9l2M8Q==} + engines: {node: '>=0.10.0'} + dev: false + /array-union@2.1.0: resolution: {integrity: sha512-HGyxoOTYUyCM6stUe6EJgnd4EoewAI7zMdfqO+kGjnlZmBDz/cR5pf8r/cR4Wq60sL/p0IkcjUEEPwS3GFrIyw==} engines: {node: '>=8'} dev: true + /array-unique@0.2.1: + resolution: {integrity: sha512-G2n5bG5fSUCpnsXz4+8FUkYsGPkNfLn9YvS66U5qbTIXI2Ynnlo4Bi42bWv+omKUCqz+ejzfClwne0alJWJPhg==} + engines: {node: '>=0.10.0'} + dev: false + /arraybuffer.prototype.slice@1.0.2: resolution: {integrity: sha512-yMBKppFur/fbHu9/6USUe03bZ4knMYiwFBcyiaXB8Go0qNehwX6inYPzK9U0NeQvGxKthcmHcaR8P5MStSRBAw==} engines: {node: '>= 0.4'} @@ -4253,6 +4311,15 @@ packages: dependencies: balanced-match: 1.0.2 + /braces@1.8.5: + resolution: {integrity: sha512-xU7bpz2ytJl1bH9cgIurjpg/n8Gohy9GTw81heDYLJQ4RU60dlyJsa+atVF2pI0yMMvKxI9HkKwjePCj5XI1hw==} + engines: {node: '>=0.10.0'} + dependencies: + expand-range: 1.8.2 + preserve: 0.2.0 + repeat-element: 1.1.4 + dev: false + /braces@3.0.2: resolution: {integrity: sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==} engines: {node: '>=8'} @@ -5558,6 +5625,20 @@ packages: strip-final-newline: 2.0.0 dev: true + /expand-brackets@0.1.5: + resolution: {integrity: sha512-hxx03P2dJxss6ceIeri9cmYOT4SRs3Zk3afZwWpOsRqLqprhTR8u++SlC+sFGsQr7WGFPdMF7Gjc1njDLDK6UA==} + engines: {node: '>=0.10.0'} + dependencies: + is-posix-bracket: 0.1.1 + dev: false + + /expand-range@1.8.2: + resolution: {integrity: sha512-AFASGfIlnIbkKPQwX1yHaDjFvh/1gyKJODme52V6IORh69uEYgZp0o9C+qsIGNVEiuuhQU0CSSl++Rlegg1qvA==} + engines: {node: '>=0.10.0'} + dependencies: + fill-range: 2.2.4 + dev: false + /extend-shallow@2.0.1: resolution: {integrity: sha512-zCnTtlxNoAiDc3gqY2aYAWFx7XWWiasuF2K8Me5WbN8otHKTUKBwjPtNpRs/rbUZm7KxWAaNj7P1a/p52GbVug==} engines: {node: '>=0.10.0'} @@ -5565,6 +5646,13 @@ packages: is-extendable: 0.1.1 dev: true + /extglob@0.3.2: + resolution: {integrity: sha512-1FOj1LOwn42TMrruOHGt18HemVnbwAmAak7krWk+wa93KXxGbK+2jpezm+ytJYDaBX0/SPLZFHKM7m+tKobWGg==} + engines: {node: '>=0.10.0'} + dependencies: + is-extglob: 1.0.0 + dev: false + /fast-deep-equal@3.1.3: resolution: {integrity: sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==} @@ -5635,12 +5723,37 @@ packages: minimatch: 5.1.6 dev: true + /filename-regex@2.0.1: + resolution: {integrity: sha512-BTCqyBaWBTsauvnHiE8i562+EdJj+oUpkqWp2R1iCoR8f6oo8STRu3of7WJJ0TqWtxN50a5YFpzYK4Jj9esYfQ==} + engines: {node: '>=0.10.0'} + dev: false + + /fill-range@2.2.4: + resolution: {integrity: sha512-cnrcCbj01+j2gTG921VZPnHbjmdAf8oQV/iGeV2kZxGSyfYjjTyY79ErsK1WJWMpw6DaApEX72binqJE+/d+5Q==} + engines: {node: '>=0.10.0'} + dependencies: + is-number: 2.1.0 + isobject: 2.1.0 + randomatic: 3.1.1 + repeat-element: 1.1.4 + repeat-string: 1.6.1 + dev: false + /fill-range@7.0.1: resolution: {integrity: sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==} engines: {node: '>=8'} dependencies: to-regex-range: 5.0.1 + /filter-array@0.2.0: + resolution: {integrity: sha512-f602ANGhuS7zg36nx9l/x4mHdfRhfjIZHLJKG6LE1nnhJgcEM1tS5GIQlVG9QBxHlMpqM5anIhpeanb6xkTi3A==} + engines: {node: '>=0.10.0'} + dependencies: + arr-filter: 1.1.2 + kind-of: 1.1.0 + micromatch: 2.3.11 + dev: false + /find-up@4.1.0: resolution: {integrity: sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==} engines: {node: '>=8'} @@ -5678,6 +5791,18 @@ packages: is-callable: 1.2.7 dev: true + /for-in@1.0.2: + resolution: {integrity: sha512-7EwmXrOjyL+ChxMhmG5lnW9MPt1aIeZEwKhQzoBUdTV0N3zuwWDZYVJatDvZ2OyzPUvdIAZDsCetk3coyMfcnQ==} + engines: {node: '>=0.10.0'} + dev: false + + /for-own@0.1.5: + resolution: {integrity: sha512-SKmowqGTJoPzLO1T0BBJpkfp3EMacCMOuH40hOUbrbzElVktk4DioXVM99QkLCyKoiuOmyjgcWMpVz2xjE7LZw==} + engines: {node: '>=0.10.0'} + dependencies: + for-in: 1.0.2 + dev: false + /form-data@4.0.0: resolution: {integrity: sha512-ETEklSGi5t0QMZuiXoA/Q6vcnxcLQP5vdugSpuAyi6SVGi2clPPp+xgEhuMaHC+zGgn31Kd235W35f7Hykkaww==} engines: {node: '>= 6'} @@ -5827,6 +5952,20 @@ packages: resolve-pkg-maps: 1.0.0 dev: true + /glob-base@0.3.0: + resolution: {integrity: sha512-ab1S1g1EbO7YzauaJLkgLp7DZVAqj9M/dvKlTt8DkXA2tiOIcSMrlVI2J1RZyB5iJVccEscjGn+kpOG9788MHA==} + engines: {node: '>=0.10.0'} + dependencies: + glob-parent: 2.0.0 + is-glob: 2.0.1 + dev: false + + /glob-parent@2.0.0: + resolution: {integrity: sha512-JDYOvfxio/t42HKdxkAYaCiBN7oYiuxykOxKxdaUW5Qn0zaYN3gRQWolrwdnf0shM9/EP0ebuuTmyoXNr1cC5w==} + dependencies: + is-glob: 2.0.1 + dev: false + /glob-parent@5.1.2: resolution: {integrity: sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==} engines: {node: '>= 6'} @@ -6157,6 +6296,11 @@ packages: engines: {node: '>=8'} dev: true + /index-of@0.1.1: + resolution: {integrity: sha512-xjViw4nSlBPC0QZeLRMndEqGQI/xFa64eGbZZV2TEJuFizwEoL3DVVk8BodC58AG6SlixzDkt3Rt3jq3+XGDuA==} + engines: {node: '>=0.10.0'} + dev: false + /inflection@1.13.4: resolution: {integrity: sha512-6I/HUDeYFfuNCVS3td055BaXBwKYuzw7K3ExVMStBowKo9oOAMJIXIHvdyR3iboTCp1b+1i5DSkIZTcwIktuDw==} engines: {'0': node >= 0.4.0} @@ -6243,6 +6387,10 @@ packages: has-tostringtag: 1.0.0 dev: true + /is-buffer@1.1.6: + resolution: {integrity: sha512-NcdALwpXkTm5Zvvbk7owOUSvVvBKDgKP5/ewfXEznmQFfs4ZRmanOeKBTjRVjka3QFoN6XJ+9F3USqfHqTaU5w==} + dev: false + /is-builtin-module@3.2.1: resolution: {integrity: sha512-BSLE3HnV2syZ0FK0iMA/yUGplUeMmNz4AW5fnTunbCIqZi4vG3WjJT9FHMy5D69xmAYBHXQhJdALdpwVxV501A==} engines: {node: '>=6'} @@ -6284,10 +6432,21 @@ packages: hasBin: true dev: true + /is-dotfile@1.0.3: + resolution: {integrity: sha512-9YclgOGtN/f8zx0Pr4FQYMdibBiTaH3sn52vjYip4ZSf6C4/6RfTEZ+MR4GvKhCxdPh21Bg42/WL55f6KSnKpg==} + engines: {node: '>=0.10.0'} + dev: false + + /is-equal-shallow@0.1.3: + resolution: {integrity: sha512-0EygVC5qPvIyb+gSz7zdD5/AAoS6Qrx1e//6N4yv4oNm30kqvdmG66oZFWVlQHUWe5OjP08FuTw2IdT0EOTcYA==} + engines: {node: '>=0.10.0'} + dependencies: + is-primitive: 2.0.0 + dev: false + /is-extendable@0.1.1: resolution: {integrity: sha512-5BMULNob1vgFX6EjQw5izWDxrecWK9AM72rugNr0TFldMOi0fj6Jk+zeKIt0xGj4cEfQIJth4w3OKWOJ4f+AFw==} engines: {node: '>=0.10.0'} - dev: true /is-extendable@1.0.1: resolution: {integrity: sha512-arnXMxT1hhoKo9k1LZdmlNyJdDDfy2v0fXjFlmok4+i8ul/6WlbVge9bhM74OpNPQPMGUToDtz+KXa1PneJxOA==} @@ -6296,6 +6455,11 @@ packages: is-plain-object: 2.0.4 dev: false + /is-extglob@1.0.0: + resolution: {integrity: sha512-7Q+VbVafe6x2T+Tu6NcOf6sRklazEPmBoB3IWk3WdGZM2iGUwU/Oe3Wtq5lSEkDTTlpp8yx+5t4pzO/i9Ty1ww==} + engines: {node: '>=0.10.0'} + dev: false + /is-extglob@2.1.1: resolution: {integrity: sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==} engines: {node: '>=0.10.0'} @@ -6305,6 +6469,13 @@ packages: engines: {node: '>=8'} dev: false + /is-glob@2.0.1: + resolution: {integrity: sha512-a1dBeB19NXsf/E0+FHqkagizel/LQw2DjSQpvQrj3zT+jYPpaUCryPnrQajXKFLCMuf4I6FhRpaGtw4lPrG6Eg==} + engines: {node: '>=0.10.0'} + dependencies: + is-extglob: 1.0.0 + dev: false + /is-glob@4.0.3: resolution: {integrity: sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==} engines: {node: '>=0.10.0'} @@ -6342,6 +6513,18 @@ packages: has-tostringtag: 1.0.0 dev: true + /is-number@2.1.0: + resolution: {integrity: sha512-QUzH43Gfb9+5yckcrSA0VBDwEtDUchrk4F6tfJZQuNzDJbEDB9cZNzSfXGQ1jqmdDY/kl41lUOWM9syA8z8jlg==} + engines: {node: '>=0.10.0'} + dependencies: + kind-of: 3.2.2 + dev: false + + /is-number@4.0.0: + resolution: {integrity: sha512-rSklcAIlf1OmFdyAqbnWTLVelsQ58uvZ66S/ZyawjWqIviTWCjg2PzVGw8WUA+nNuPTqb4wgA+NszrJ+08LlgQ==} + engines: {node: '>=0.10.0'} + dev: false + /is-number@7.0.0: resolution: {integrity: sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==} engines: {node: '>=0.12.0'} @@ -6363,10 +6546,20 @@ packages: isobject: 3.0.1 dev: false + /is-posix-bracket@0.1.1: + resolution: {integrity: sha512-Yu68oeXJ7LeWNmZ3Zov/xg/oDBnBK2RNxwYY1ilNJX+tKKZqgPK+qOn/Gs9jEu66KDY9Netf5XLKNGzas/vPfQ==} + engines: {node: '>=0.10.0'} + dev: false + /is-potential-custom-element-name@1.0.1: resolution: {integrity: sha512-bCYeRA2rVibKZd+s2625gGnGF/t7DSqDs4dP7CrLA1m7jKWz6pps0LpYLJN8Q64HtmPKJ1hrN3nzPNKFEKOUiQ==} dev: true + /is-primitive@2.0.0: + resolution: {integrity: sha512-N3w1tFaRfk3UrPfqeRyD+GYDASU3W5VinKhlORy8EWVf/sIdDL9GAcew85XmktCfH+ngG7SRXEVDoO18WMdB/Q==} + engines: {node: '>=0.10.0'} + dev: false + /is-primitive@3.0.1: resolution: {integrity: sha512-GljRxhWvlCNRfZyORiH77FwdFwGcMO620o37EOYC0ORWdq+WYNVqW0w2Juzew4M+L81l6/QS3t5gkkihyRqv9w==} engines: {node: '>=0.10.0'} @@ -6445,6 +6638,10 @@ packages: is-docker: 2.2.1 dev: true + /isarray@1.0.0: + resolution: {integrity: sha512-VLghIWNM6ELQzo7zwmcg0NmTVyWKYjvIeM83yjp0wRDTmUnrM678fQbcKBo6n2CJEF0szoG//ytg+TKla89ALQ==} + dev: false + /isarray@2.0.5: resolution: {integrity: sha512-xHjhDr3cNBK0BzdUJSPXZntQUx/mwMS5Rw4A7lPJ90XGAO6ISP/ePDNuo0vhqOZU+UD5JoodwCAAoZQd3FeAKw==} dev: true @@ -6453,6 +6650,13 @@ packages: resolution: {integrity: sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==} dev: true + /isobject@2.1.0: + resolution: {integrity: sha512-+OUdGJlgjOBZDfxnDjYYG6zp487z0JGNQq3cYQYg5f5hKR+syHMsaztzGeml/4kGG55CSpKSpWTY+jYGgsHLgA==} + engines: {node: '>=0.10.0'} + dependencies: + isarray: 1.0.0 + dev: false + /isobject@3.0.1: resolution: {integrity: sha512-WhB9zCku7EGTj/HQQRz5aUQEUeoQZH2bWcltRErOpymJ4boYE6wL9Tbr23krRPSZ+C5zqNSrSw+Cc7sZZ4b7vg==} engines: {node: '>=0.10.0'} @@ -6634,10 +6838,21 @@ packages: resolution: {integrity: sha512-UfpWE/VZn0iP50d8cz9NrZLM9lSWhcJ+0Gt/nm4by88UL+J1SiKN8/5dkjMmbEzwL2CAe+67GsegCbIKtbp75A==} dev: false + /kind-of@1.1.0: + resolution: {integrity: sha512-aUH6ElPnMGon2/YkxRIigV32MOpTVcoXQ1Oo8aYn40s+sJ3j+0gFZsT8HKDcxNy7Fi9zuquWtGaGAahOdv5p/g==} + engines: {node: '>=0.10.0'} + dev: false + + /kind-of@3.2.2: + resolution: {integrity: sha512-NOW9QQXMoZGg/oqnVNoNTTIFEIid1627WCffUBJEdMxYApq7mNE7CpzucIPc+ZQg25Phej7IJSmX3hO+oblOtQ==} + engines: {node: '>=0.10.0'} + dependencies: + is-buffer: 1.1.6 + dev: false + /kind-of@6.0.3: resolution: {integrity: sha512-dcS1ul+9tmeD95T+x28/ehLgd9mENa3LsvDTtzm3vyBEO7RPptvAD+t44WVXaUjTBRcrpFeFlC8WCruUR456hw==} engines: {node: '>=0.10.0'} - dev: true /kolorist@1.8.0: resolution: {integrity: sha512-Y+60/zizpJ3HRH8DCss+q95yr6145JXZo46OTpFvDZWLfRCE4qChOyk1b26nMaNpfHHgxagk9dXT5OP0Tfe+dQ==} @@ -6811,6 +7026,20 @@ packages: resolution: {integrity: sha512-s8UhlNe7vPKomQhC1qFelMokr/Sc3AgNbso3n74mVPA5LTZwkB9NlXf4XPamLxJE8h0gh73rM94xvwRT2CVInw==} dev: false + /make-iterator@0.1.1: + resolution: {integrity: sha512-s8tbTxYqrfcXYHAPxUecPxgBnWod7yFShdSOWiV17WRM87bBH2mzr24A4tpUDv9SqebaV6JsPApwKXnisMmMBA==} + engines: {node: '>=0.10.0'} + dependencies: + for-own: 0.1.5 + dev: false + + /make-iterator@1.0.1: + resolution: {integrity: sha512-pxiuXh0iVEq7VM7KMIhs5gxsfxCux2URptUQaXo4iZZJxBAzTPOLE2BumO5dbfVYq/hBJFBR/a1mFDmOx5AGmw==} + engines: {node: '>=0.10.0'} + dependencies: + kind-of: 6.0.3 + dev: false + /map-stream@0.1.0: resolution: {integrity: sha512-CkYQrPYZfWnu/DAmVCpTSX/xHpKZ80eKh2lAkyA6AJTef6bW+6JpbQZN5rofum7da+SyN1bi5ctTm+lTfcCW3g==} dev: true @@ -6831,6 +7060,10 @@ packages: hasBin: true dev: false + /math-random@1.0.4: + resolution: {integrity: sha512-rUxjysqif/BZQH2yhd5Aaq7vXMSx9NdEsQcyA07uEzIvxgI7zIr33gGsh+RU0/XjmQpCW7RsVof1vlkvQVCK5A==} + dev: false + /mathjs@11.9.1: resolution: {integrity: sha512-VdB9ELZ6Dwda13j5d1eCBETmPO8m9qIJETUdfZmTA9cPnXUiIk7UuoAmvxFqtfAe32XYuRugAec2Ndv0/RfRhg==} engines: {node: '>= 14'} @@ -6890,6 +7123,25 @@ packages: - supports-color dev: true + /micromatch@2.3.11: + resolution: {integrity: sha512-LnU2XFEk9xxSJ6rfgAry/ty5qwUTyHYOBU0g4R6tIw5ljwgGIBmiKhRWLw5NpMOnrgUNcDJ4WMp8rl3sYVHLNA==} + engines: {node: '>=0.10.0'} + dependencies: + arr-diff: 2.0.0 + array-unique: 0.2.1 + braces: 1.8.5 + expand-brackets: 0.1.5 + extglob: 0.3.2 + filename-regex: 2.0.1 + is-extglob: 1.0.0 + is-glob: 2.0.1 + kind-of: 3.2.2 + normalize-path: 2.1.1 + object.omit: 2.0.1 + parse-glob: 3.0.4 + regex-cache: 0.4.4 + dev: false + /micromatch@4.0.5: resolution: {integrity: sha512-DMy+ERcEW2q8Z2Po+WNXuw3c5YaUSFjAO5GsJqfEl7UjvtIuFKO6ZrKvcItdy98dwFI2N1tg3zNIdKaQT+aNdA==} engines: {node: '>=8.6'} @@ -7108,6 +7360,13 @@ packages: validate-npm-package-license: 3.0.4 dev: true + /normalize-path@2.1.1: + resolution: {integrity: sha512-3pKJwH184Xo/lnH6oyP1q2pMd7HcypqqmRs91/6/i2CGtWwIKGCkOOMTm/zXbgTEWHw1uNpNi/igc3ePOYHb6w==} + engines: {node: '>=0.10.0'} + dependencies: + remove-trailing-separator: 1.1.0 + dev: false + /normalize-path@3.0.0: resolution: {integrity: sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==} engines: {node: '>=0.10.0'} @@ -7148,6 +7407,14 @@ packages: object-keys: 1.1.1 dev: true + /object.omit@2.0.1: + resolution: {integrity: sha512-UiAM5mhmIuKLsOvrL+B0U2d1hXHF3bFYWIuH1LMpuV2EJEHG1Ntz06PgLEHjm6VFd87NpH8rastvPoyv6UW2fA==} + engines: {node: '>=0.10.0'} + dependencies: + for-own: 0.1.5 + is-extendable: 0.1.1 + dev: false + /object.omit@3.0.0: resolution: {integrity: sha512-EO+BCv6LJfu+gBIF3ggLicFebFLN5zqzz/WWJlMFfkMyGth+oBkhxzDl0wx2W4GkLzuQs/FsSkXZb2IMWQqmBQ==} engines: {node: '>=0.10.0'} @@ -7294,6 +7561,16 @@ packages: is-hexadecimal: 1.0.4 dev: true + /parse-glob@3.0.4: + resolution: {integrity: sha512-FC5TeK0AwXzq3tUBFtH74naWkPQCEWs4K+xMxWZBlKDWu0bVHXGZa+KKqxKidd7xwhdZ19ZNuF2uO1M/r196HA==} + engines: {node: '>=0.10.0'} + dependencies: + glob-base: 0.3.0 + is-dotfile: 1.0.3 + is-extglob: 1.0.0 + is-glob: 2.0.1 + dev: false + /parse-json@5.2.0: resolution: {integrity: sha512-ayCKvm/phCGxOkYRSCM82iDwct8/EonSEgCSxWxD7ve6jHggsFl4fZVQBPRNgQoKiuV/odhFrGzQXZwbifC8Rg==} engines: {node: '>=8'} @@ -7487,6 +7764,11 @@ packages: engines: {node: '>= 0.8.0'} dev: true + /preserve@0.2.0: + resolution: {integrity: sha512-s/46sYeylUfHNjI+sA/78FAHlmIuKqI9wNnzEOGehAlUUYeObv5C2mOinXBjyUyWmJ2SfcS2/ydApH4hTF4WXQ==} + engines: {node: '>=0.10.0'} + dev: false + /prettier@3.0.0: resolution: {integrity: sha512-zBf5eHpwHOGPC47h0zrPyNn+eAEIdEzfywMoYn2XPi0P44Zp0tSq64rq0xAREh4auw2cJZHo9QUob+NqCQky4g==} engines: {node: '>=14'} @@ -7721,6 +8003,15 @@ packages: ret: 0.1.15 dev: false + /randomatic@3.1.1: + resolution: {integrity: sha512-TuDE5KxZ0J461RVjrJZCJc+J+zCkTb1MbH9AQUq68sMhOMcy9jLcb3BrZKgp9q9Ncltdg4QVqWrH02W2EFFVYw==} + engines: {node: '>= 0.10.0'} + dependencies: + is-number: 4.0.0 + kind-of: 6.0.3 + math-random: 1.0.4 + dev: false + /randombytes@2.1.0: resolution: {integrity: sha512-vYl3iOX+4CKUWuxGi9Ukhie6fsqXqS9FE2Zaic4tNFD2N2QQaXOMFbuKK4QmDHC0JO6B1Zp41J0LpT0oR68amQ==} dependencies: @@ -7785,6 +8076,13 @@ packages: '@babel/runtime': 7.23.2 dev: true + /regex-cache@0.4.4: + resolution: {integrity: sha512-nVIZwtCjkC9YgvWkpM55B5rBhBYRZhAaJbgcFYXXsHnbZ9UZI9nnVWYZpBlCqv9ho2eZryPnWrZGsOdPwVWXWQ==} + engines: {node: '>=0.10.0'} + dependencies: + is-equal-shallow: 0.1.3 + dev: false + /regexp-tree@0.1.27: resolution: {integrity: sha512-iETxpjK6YoRWJG5o6hXLwvjYAoW+FEZn9os0PD/b6AP6xQwsa/Y7lCVgIixBbUPMfhu+i2LtdeAqVTgGlQarfA==} hasBin: true @@ -7825,6 +8123,20 @@ packages: jsesc: 0.5.0 dev: true + /remove-trailing-separator@1.1.0: + resolution: {integrity: sha512-/hS+Y0u3aOfIETiaiirUFwDBDzmXPvO+jAfKTitUngIPzdKc6Z0LoFjM/CK5PL4C+eKwHohlHAb6H0VFfmmUsw==} + dev: false + + /repeat-element@1.1.4: + resolution: {integrity: sha512-LFiNfRcSu7KK3evMyYOuCzv3L10TW7yC1G2/+StMjK8Y6Vqd2MG7r/Qjw4ghtuCOjFvlnms/iMmLqpvW/ES/WQ==} + engines: {node: '>=0.10.0'} + dev: false + + /repeat-string@1.6.1: + resolution: {integrity: sha512-PV0dzCYDNfRi1jCDbJzpW7jNNDRuCOG/jI5ctQcGKt/clZD+YcPS3yIlWuTJMmESC8aevCFmWJy5wjAFgNqN6w==} + engines: {node: '>=0.10'} + dev: false + /require-directory@2.1.1: resolution: {integrity: sha512-fGxEI7+wsG9xrvdjsrlmL22OMTTiHRwAMroiEeMgq8gzoLC/PQr7RsRDSTLUg/bZAZtF+TVIkHc6/4RIKrui+Q==} engines: {node: '>=0.10.0'} diff --git a/src/tools/index.ts b/src/tools/index.ts index b4c161ef..6774e840 100644 --- a/src/tools/index.ts +++ b/src/tools/index.ts @@ -26,6 +26,7 @@ import { tool as tomlToJson } from './toml-to-json'; import { tool as jsonToCsv } from './json-to-csv'; import { tool as cameraRecorder } from './camera-recorder'; import { tool as listConverter } from './list-converter'; +import { tool as listComparer } from './list-comparer'; import { tool as phoneParserAndFormatter } from './phone-parser-and-formatter'; import { tool as jsonDiff } from './json-diff'; import { tool as ipv4RangeExpander } from './ipv4-range-expander'; @@ -108,6 +109,7 @@ export const toolsByCategory: ToolCategory[] = [ jsonToYaml, jsonToToml, listConverter, + listComparer, tomlToJson, tomlToYaml, xmlToJson, diff --git a/src/tools/list-comparer/index.ts b/src/tools/list-comparer/index.ts new file mode 100644 index 00000000..88262c14 --- /dev/null +++ b/src/tools/list-comparer/index.ts @@ -0,0 +1,12 @@ +import { List } from '@vicons/tabler'; +import { defineTool } from '../tool'; + +export const tool = defineTool({ + name: 'Lists Comparer', + path: '/list-comparer', + description: 'Compare two list items', + keywords: ['list', 'comparer'], + component: () => import('./list-comparer.vue'), + icon: List, + createdAt: new Date('2024-08-15'), +}); diff --git a/src/tools/list-comparer/list-comparer.service.test.ts b/src/tools/list-comparer/list-comparer.service.test.ts new file mode 100644 index 00000000..ae615774 --- /dev/null +++ b/src/tools/list-comparer/list-comparer.service.test.ts @@ -0,0 +1,97 @@ +import { describe, expect, it } from 'vitest'; +import { compareLists } from './list-comparer.service'; + +describe('list-comparer', () => { + describe('compareLists', () => { + it('return correct comparaison', () => { + expect(compareLists({ + list1: '1\n 2\n3\n4\n5\n4\n7\nA', + list2: '1\n2\n3\n4\n6\n4\n7\na', + trimItems: true, + ignoreCase: true, + })).to.deep.eq({ + list1Not2: [ + '5', + ], + list2Not1: [ + '6', + ], + same: [ + '1', + '2', + '3', + '4', + '7', + 'a', + ], + }); + + expect(compareLists({ + list1: '1\n 2\n3\n4\n5\n4\n7\nA', + list2: '1\n2\n3\n4\n6\n4\n7\na', + trimItems: false, + ignoreCase: false, + })).to.deep.eq({ + list1Not2: [ + ' 2', + '5', + 'A', + ], + list2Not1: [ + '2', + '6', + 'a', + ], + same: [ + '1', + '3', + '4', + '7', + ], + }); + + expect(compareLists({ + list1: '1, 2,3,4,5,4,7,A,A', + list2: '1\n2\n3\n4\n6\n4\n7\na', + trimItems: false, + ignoreCase: false, + separator: ',', + })).to.deep.eq({ + list1Not2: [ + ' 2', + '5', + 'A', + ], + list2Not1: [ + '2', + '6', + 'a', + ], + same: [ + '1', + '3', + '4', + '7', + ], + }); + + expect(compareLists({ + list1: '10\n20\n20\n30', + list2: '30\n20\n40', + trimItems: false, + ignoreCase: false, + })).to.deep.eq({ + list1Not2: [ + '10', + ], + list2Not1: [ + '40', + ], + same: [ + '20', + '30', + ], + }); + }); + }); +}); diff --git a/src/tools/list-comparer/list-comparer.service.ts b/src/tools/list-comparer/list-comparer.service.ts new file mode 100644 index 00000000..69fb1e3e --- /dev/null +++ b/src/tools/list-comparer/list-comparer.service.ts @@ -0,0 +1,33 @@ +import _ from 'lodash'; +import intersection from 'array-intersection'; +import diff from 'arr-diff'; + +export function compareLists({ + list1, + list2, + ignoreCase = false, + trimItems = true, + separator = '', +}: { + list1: string + list2: string + separator?: string + ignoreCase?: boolean + trimItems?: boolean +}) { + const prepareList = (list: string) => + _.chain(list ?? '') + .thru(text => ignoreCase ? text.toLowerCase() : text) + .split(new RegExp(`[\\n${separator}]`)) + .map(text => trimItems ? text.trim() : text) + .value(); + + const list1Arr = prepareList(list1); + const list2Arr = prepareList(list2); + + return { + same: intersection(list1Arr, list2Arr), + list2Not1: diff(list2Arr, list1Arr), + list1Not2: diff(list1Arr, list2Arr), + }; +} diff --git a/src/tools/list-comparer/list-comparer.vue b/src/tools/list-comparer/list-comparer.vue new file mode 100644 index 00000000..a5b59c51 --- /dev/null +++ b/src/tools/list-comparer/list-comparer.vue @@ -0,0 +1,89 @@ + + + From 25dd3feb50410e42aa2da98ea945ffc286e78955 Mon Sep 17 00:00:00 2001 From: ShareVB Date: Mon, 23 Sep 2024 00:38:20 +0200 Subject: [PATCH 2/5] fix: changed UI --- package.json | 1 + pnpm-lock.yaml | 7 +++++++ src/tools/list-comparer/array-intersection.d.ts | 3 +++ src/tools/list-comparer/list-comparer.vue | 7 ------- 4 files changed, 11 insertions(+), 7 deletions(-) create mode 100644 src/tools/list-comparer/array-intersection.d.ts diff --git a/package.json b/package.json index 5827d132..a94d7c3c 100644 --- a/package.json +++ b/package.json @@ -42,6 +42,7 @@ "@tiptap/pm": "2.1.6", "@tiptap/starter-kit": "2.1.6", "@tiptap/vue-3": "2.0.3", + "@types/arr-diff": "^4.0.3", "@types/figlet": "^1.5.8", "@types/markdown-it": "^13.0.7", "@vicons/material": "^0.12.0", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 7b2bbfe9..997dcc0a 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -26,6 +26,9 @@ dependencies: '@tiptap/vue-3': specifier: 2.0.3 version: 2.0.3(@tiptap/core@2.1.12)(@tiptap/pm@2.1.6)(vue@3.3.4) + '@types/arr-diff': + specifier: ^4.0.3 + version: 4.0.3 '@types/figlet': specifier: ^1.5.8 version: 1.5.8 @@ -2922,6 +2925,10 @@ packages: resolution: {integrity: sha512-yhxwIlFVSVcMym3O31HoMnRXpoenmpIxcj4Yoes2DUpe+xCJnA7ECQP1Vw889V0jTt/2nzvpLQ/UuMYCd3JPIg==} dev: true + /@types/arr-diff@4.0.3: + resolution: {integrity: sha512-oIBe7qtc48Q1JPNuqSIUYCNMQxYzTkQAEw07b0NEZpwKbUeOswzex3qfvXCLrZDIQ9t3ucIxH6JqFmjRTPbDEg==} + dev: false + /@types/bcryptjs@2.4.2: resolution: {integrity: sha512-LiMQ6EOPob/4yUL66SZzu6Yh77cbzJFYll+ZfaPiPPFswtIlA/Fs1MzdKYA7JApHU49zQTbJGX3PDmCpIdDBRQ==} dev: true diff --git a/src/tools/list-comparer/array-intersection.d.ts b/src/tools/list-comparer/array-intersection.d.ts new file mode 100644 index 00000000..e44cc4e6 --- /dev/null +++ b/src/tools/list-comparer/array-intersection.d.ts @@ -0,0 +1,3 @@ +declare module 'array-intersection' { + export default function intersection(...arrays: any[]):any[]; +} \ No newline at end of file diff --git a/src/tools/list-comparer/list-comparer.vue b/src/tools/list-comparer/list-comparer.vue index a5b59c51..94caa5a4 100644 --- a/src/tools/list-comparer/list-comparer.vue +++ b/src/tools/list-comparer/list-comparer.vue @@ -16,7 +16,6 @@ const compareResult = computed(() => { list2: list2.value, ignoreCase: compareConfig.value.ignoreCase, trimItems: compareConfig.value.trimItems, - noDuplicate: compareConfig.value.noDuplicate, separator: compareConfig.value.separator, }); }); @@ -39,12 +38,6 @@ const compareResult = computed(() => { > - - - Date: Sat, 28 Sep 2024 11:15:07 +0200 Subject: [PATCH 3/5] feat(new tool): Currency Converter Fix part of #571 --- components.d.ts | 12 +- package.json | 2 + pnpm-lock.yaml | 70 +++++++++-- src/composable/queryParams.ts | 33 ++++- .../currency-converter/currency-converter.vue | 119 ++++++++++++++++++ .../currency-exchanger-js.d.ts | 4 + src/tools/currency-converter/index.ts | 12 ++ src/tools/currency-converter/moneys.json | 1 + src/tools/index.ts | 2 + 9 files changed, 242 insertions(+), 13 deletions(-) create mode 100644 src/tools/currency-converter/currency-converter.vue create mode 100644 src/tools/currency-converter/currency-exchanger-js.d.ts create mode 100644 src/tools/currency-converter/index.ts create mode 100644 src/tools/currency-converter/moneys.json diff --git a/components.d.ts b/components.d.ts index 89f41f80..dbdec0cf 100644 --- a/components.d.ts +++ b/components.d.ts @@ -64,6 +64,7 @@ declare module '@vue/runtime-core' { 'CTextCopyable.demo': typeof import('./src/ui/c-text-copyable/c-text-copyable.demo.vue')['default'] CTooltip: typeof import('./src/ui/c-tooltip/c-tooltip.vue')['default'] 'CTooltip.demo': typeof import('./src/ui/c-tooltip/c-tooltip.demo.vue')['default'] + CurrencyConverter: typeof import('./src/tools/currency-converter/currency-converter.vue')['default'] DateTimeConverter: typeof import('./src/tools/date-time-converter/date-time-converter.vue')['default'] 'DemoHome.page': typeof import('./src/ui/demo/demo-home.page.vue')['default'] DemoWrapper: typeof import('./src/ui/demo/demo-wrapper.vue')['default'] @@ -129,11 +130,12 @@ declare module '@vue/runtime-core' { MetaTagGenerator: typeof import('./src/tools/meta-tag-generator/meta-tag-generator.vue')['default'] MimeTypes: typeof import('./src/tools/mime-types/mime-types.vue')['default'] NavbarButtons: typeof import('./src/components/NavbarButtons.vue')['default'] - NCode: typeof import('naive-ui')['NCode'] NCollapseTransition: typeof import('naive-ui')['NCollapseTransition'] 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'] - NForm: typeof import('naive-ui')['NForm'] NFormItem: typeof import('naive-ui')['NFormItem'] NH1: typeof import('naive-ui')['NH1'] NH3: typeof import('naive-ui')['NH3'] @@ -142,9 +144,9 @@ declare module '@vue/runtime-core' { NLayout: typeof import('naive-ui')['NLayout'] NLayoutSider: typeof import('naive-ui')['NLayoutSider'] NMenu: typeof import('naive-ui')['NMenu'] - NScrollbar: typeof import('naive-ui')['NScrollbar'] - NSlider: typeof import('naive-ui')['NSlider'] - NSwitch: typeof import('naive-ui')['NSwitch'] + NP: typeof import('naive-ui')['NP'] + NSelect: typeof import('naive-ui')['NSelect'] + NTable: typeof import('naive-ui')['NTable'] 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'] PasswordStrengthAnalyser: typeof import('./src/tools/password-strength-analyser/password-strength-analyser.vue')['default'] diff --git a/package.json b/package.json index 6191f702..e27c6116 100644 --- a/package.json +++ b/package.json @@ -55,6 +55,8 @@ "cron-validator": "^1.3.1", "cronstrue": "^2.26.0", "crypto-js": "^4.1.1", + "currency-codes-ts": "^3.0.0", + "currency-exchanger-js": "^1.0.4", "date-fns": "^2.29.3", "dompurify": "^3.0.6", "email-normalizer": "^1.0.0", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 3044541a..7c290628 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -65,6 +65,12 @@ dependencies: crypto-js: specifier: ^4.1.1 version: 4.1.1 + currency-codes-ts: + specifier: ^3.0.0 + version: 3.0.0 + currency-exchanger-js: + specifier: ^1.0.4 + version: 1.0.4 date-fns: specifier: ^2.29.3 version: 2.29.3 @@ -3360,7 +3366,7 @@ packages: dependencies: '@unhead/dom': 0.5.1 '@unhead/schema': 0.5.1 - '@vueuse/shared': 10.11.1(vue@3.3.4) + '@vueuse/shared': 11.1.0(vue@3.3.4) unhead: 0.5.1 vue: 3.3.4 transitivePeerDependencies: @@ -3993,19 +3999,19 @@ packages: - vue dev: false - /@vueuse/shared@10.11.1(vue@3.3.4): - resolution: {integrity: sha512-LHpC8711VFZlDaYUXEBbFBCQ7GS3dVU9mjOhhMhXP6txTV4EhYQg/KGnQuvt/sPAtoUKq7VVUnL6mVtFoL42sA==} + /@vueuse/shared@10.3.0(vue@3.3.4): + resolution: {integrity: sha512-kGqCTEuFPMK4+fNWy6dUOiYmxGcUbtznMwBZLC1PubidF4VZY05B+Oht7Jh7/6x4VOWGpvu3R37WHi81cKpiqg==} dependencies: - vue-demi: 0.14.10(vue@3.3.4) + vue-demi: 0.14.5(vue@3.3.4) transitivePeerDependencies: - '@vue/composition-api' - vue dev: false - /@vueuse/shared@10.3.0(vue@3.3.4): - resolution: {integrity: sha512-kGqCTEuFPMK4+fNWy6dUOiYmxGcUbtznMwBZLC1PubidF4VZY05B+Oht7Jh7/6x4VOWGpvu3R37WHi81cKpiqg==} + /@vueuse/shared@11.1.0(vue@3.3.4): + resolution: {integrity: sha512-YUtIpY122q7osj+zsNMFAfMTubGz0sn5QzE5gPzAIiCmtt2ha3uQUY1+JPyL4gRCTsLPX82Y9brNbo/aqlA91w==} dependencies: - vue-demi: 0.14.5(vue@3.3.4) + vue-demi: 0.14.10(vue@3.3.4) transitivePeerDependencies: - '@vue/composition-api' - vue @@ -4638,6 +4644,14 @@ packages: resolution: {integrity: sha512-M1VdV3hpBAsd1Zzvqcvf63wgDpcwCuS4WiNEVFpJ0s33MGO2sVDTfswYq0EPypCmESrCzmgL8h68DTzJuSDbVA==} dev: false + /cross-fetch@3.1.8: + resolution: {integrity: sha512-cvA+JwZoU0Xq+h6WkMvAUqPEYy92Obet6UdKLfW60qn99ftItKjB5T+BkyWOFWe2pUyfQ+IJHmpOTznqk1M6Kg==} + dependencies: + node-fetch: 2.7.0 + transitivePeerDependencies: + - encoding + dev: false + /cross-spawn@7.0.3: resolution: {integrity: sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==} engines: {node: '>= 8'} @@ -4721,6 +4735,21 @@ packages: /csstype@3.1.2: resolution: {integrity: sha512-I7K1Uu0MBPzaFKg4nI5Q7Vs2t+3gWWW648spaF+Rg7pI9ds18Ugn+lvg4SHczUdKlHI5LWBXyqfS8+DufyBsgQ==} + /currency-codes-ts@3.0.0: + resolution: {integrity: sha512-ZJeCpq5uY2t8dDl4xdF15shkp5o8jrHcD4lHftK/O8j8xTHlXg0E5YhpZbRJvnLRaKe+JQh1/q1AI9Wc2Dl3Nw==} + engines: {node: '>=14'} + dependencies: + lodash-es: 4.17.21 + dev: false + + /currency-exchanger-js@1.0.4: + resolution: {integrity: sha512-znd30Ueuf3IFTwNEuSy45uBEZZXJIUG9Z4Cpym5VxSxafx/CazPCRx5NMrqOFE2ZYPXezo7FfJLa8SuES3PnYw==} + dependencies: + cross-fetch: 3.1.8 + transitivePeerDependencies: + - encoding + dev: false + /dash-get@1.0.2: resolution: {integrity: sha512-4FbVrHDwfOASx7uQVxeiCTo7ggSdYZbqs8lH+WU6ViypPlDbe9y6IP5VVUDQBv9DcnyaiPT5XT0UWHgJ64zLeQ==} dev: false @@ -7071,6 +7100,18 @@ packages: resolution: {integrity: sha512-NsXBU0UgBxo2rQLOeWNZqS3fvflWePMECr8CoSWoSTqCqGbVVsvl9vZu1HfQicYN0g5piV9Gh8RTEvo/uP752w==} dev: true + /node-fetch@2.7.0: + resolution: {integrity: sha512-c4FRfUm/dbcWZ7U+1Wq0AwCyFL+3nt2bEw05wfxSz+DWpWsitgmSgYmy2dQdWyKC1694ELPqMs/YzUSNozLt8A==} + engines: {node: 4.x || >=6.0.0} + peerDependencies: + encoding: ^0.1.0 + peerDependenciesMeta: + encoding: + optional: true + dependencies: + whatwg-url: 5.0.0 + dev: false + /node-fetch@3.2.10: resolution: {integrity: sha512-MhuzNwdURnZ1Cp4XTazr69K0BTizsBroX7Zx3UgDSVcZYKF/6p0CBe4EUb/hLqmzVhl0UpYfgRljQ4yxE+iCxA==} engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0} @@ -8485,6 +8526,10 @@ packages: url-parse: 1.5.10 dev: true + /tr46@0.0.3: + resolution: {integrity: sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw==} + dev: false + /tr46@1.0.1: resolution: {integrity: sha512-dTpowEjclQ7Kgx5SdBkqRzVhERQXov8/l9Ft9dVM9fmg0W0KQSVaXX9T4i6twCPNtYiZM53lpSSUAwJbFPOHxA==} dependencies: @@ -9292,6 +9337,10 @@ packages: engines: {node: '>= 8'} dev: true + /webidl-conversions@3.0.1: + resolution: {integrity: sha512-2JAn3z8AR6rjK8Sm8orRC0h/bcl/DqL7tRPdGZ4I1CjdF+EaMLmYxBHyXuKL849eucPFhvBoxMsflfOb8kxaeQ==} + dev: false + /webidl-conversions@4.0.2: resolution: {integrity: sha512-YQ+BmxuTgd6UXZW3+ICGfyqRyHXVlD5GtQr5+qjiNW7bF0cqrzX500HVXPBOvgXb5YnzDd+h0zqyv61KUD7+Sg==} dev: true @@ -9332,6 +9381,13 @@ packages: webidl-conversions: 7.0.0 dev: true + /whatwg-url@5.0.0: + resolution: {integrity: sha512-saE57nupxk6v3HY35+jzBwYa0rKSy0XR8JSxZPwgLr7ys0IBzhGviA1/TUGJLmSVqs8pb9AnvICXEuOHLprYTw==} + dependencies: + tr46: 0.0.3 + webidl-conversions: 3.0.1 + dev: false + /whatwg-url@7.1.0: resolution: {integrity: sha512-WUu7Rg1DroM7oQvGWfOiAK21n74Gg+T4elXEQYkOhtyLeWiJFoOGLXPKI/9gzIie9CtwVLm8wtw6YJdKyxSjeg==} dependencies: diff --git a/src/composable/queryParams.ts b/src/composable/queryParams.ts index 9699abbc..7cc8cc0d 100644 --- a/src/composable/queryParams.ts +++ b/src/composable/queryParams.ts @@ -1,7 +1,8 @@ import { useRouteQuery } from '@vueuse/router'; import { computed } from 'vue'; +import { useStorage } from '@vueuse/core'; -export { useQueryParam }; +export { useQueryParam, useQueryParamOrStorage }; const transformers = { number: { @@ -16,6 +17,12 @@ const transformers = { fromQuery: (value: string) => value.toLowerCase() === 'true', toQuery: (value: boolean) => (value ? 'true' : 'false'), }, + object: { + fromQuery: (value: string) => { + return JSON.parse(value); + }, + toQuery: (value: object) => JSON.stringify(value), + }, }; function useQueryParam({ name, defaultValue }: { name: string; defaultValue: T }) { @@ -33,3 +40,27 @@ function useQueryParam({ name, defaultValue }: { name: string; defaultValue: }, }); } + +function useQueryParamOrStorage({ 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; +} diff --git a/src/tools/currency-converter/currency-converter.vue b/src/tools/currency-converter/currency-converter.vue new file mode 100644 index 00000000..eee3696f --- /dev/null +++ b/src/tools/currency-converter/currency-converter.vue @@ -0,0 +1,119 @@ + + + diff --git a/src/tools/currency-converter/currency-exchanger-js.d.ts b/src/tools/currency-converter/currency-exchanger-js.d.ts new file mode 100644 index 00000000..8e94badc --- /dev/null +++ b/src/tools/currency-converter/currency-exchanger-js.d.ts @@ -0,0 +1,4 @@ +declare module 'currency-exchanger-js'{ + export function convertOnDate(value: number,fromCurrency: string,toCurrency: string,inputDate: Date): number; + export function convert(value: number,fromCurrency: string,toCurrency: string): number; +} diff --git a/src/tools/currency-converter/index.ts b/src/tools/currency-converter/index.ts new file mode 100644 index 00000000..92401531 --- /dev/null +++ b/src/tools/currency-converter/index.ts @@ -0,0 +1,12 @@ +import { Currency } from '@vicons/tabler'; +import { defineTool } from '../tool'; + +export const tool = defineTool({ + name: 'Currency Converter', + path: '/currency-converter', + description: 'Convert currency values using ExchangeRate-API', + keywords: ['currency', 'converter'], + component: () => import('./currency-converter.vue'), + icon: Currency, + createdAt: new Date('2024-08-15'), +}); diff --git a/src/tools/currency-converter/moneys.json b/src/tools/currency-converter/moneys.json new file mode 100644 index 00000000..d8e52071 --- /dev/null +++ b/src/tools/currency-converter/moneys.json @@ -0,0 +1 @@ +{ "1000sats": "", "1inch": "1inch", "aave": "Aave", "ada": "Cardano", "aed": "Emirati Dirham", "afn": "Afghan Afghani", "agix": "SingularityNET", "akt": "Akash Network", "algo": "Algorand", "all": "Albanian Lek", "amd": "Armenian Dram", "amp": "Amp", "ang": "Dutch Guilder", "aoa": "Angolan Kwanza", "ape": "ApeCoin", "apt": "Aptos", "ar": "Arweave", "arb": "Arbitrum", "ars": "Argentine Peso", "atom": "Cosmos", "ats": "Austrian Schilling", "aud": "Australian Dollar", "avax": "Avalanche", "awg": "Aruban or Dutch Guilder", "axs": "Axie Infinity", "azm": "Azerbaijani Manat", "azn": "Azerbaijan Manat", "bake": "BakeryToken", "bam": "Bosnian Convertible Mark", "bat": "Basic Attention Token", "bbd": "Barbadian or Bajan Dollar", "bch": "Bitcoin Cash", "bdt": "Bangladeshi Taka", "bef": "Belgian Franc", "bgn": "Bulgarian Lev", "bhd": "Bahraini Dinar", "bif": "Burundian Franc", "bmd": "Bermudian Dollar", "bnb": "Binance Coin", "bnd": "Bruneian Dollar", "bob": "Bolivian Bolíviano", "brl": "Brazilian Real", "bsd": "Bahamian Dollar", "bsv": "Bitcoin SV", "bsw": "Biswap", "btc": "Bitcoin", "btcb": "Bitcoin BEP2", "btg": "Bitcoin Gold", "btn": "Bhutanese Ngultrum", "btt": "BitTorrent", "busd": "Binance USD", "bwp": "Botswana Pula", "byn": "Belarusian Ruble", "byr": "Belarusian Ruble", "bzd": "Belizean Dollar", "cad": "Canadian Dollar", "cake": "PancakeSwap", "cdf": "Congolese Franc", "celo": "Celo", "cfx": "Conflux", "chf": "Swiss Franc", "chz": "Chiliz", "clp": "Chilean Peso", "cnh": "Chinese Yuan Renminbi Offshore", "cny": "Chinese Yuan Renminbi", "comp": "Compound", "cop": "Colombian Peso", "crc": "Costa Rican Colon", "cro": "Crypto.com Chain", "crv": "Curve DAO Token", "cspr": "Casper", "cuc": "Cuban Convertible Peso", "cup": "Cuban Peso", "cve": "Cape Verdean Escudo", "cvx": "Convex Finance", "cyp": "Cypriot Pound", "czk": "Czech Koruna", "dai": "DAI", "dash": "Digital Cash", "dcr": "Decred", "dem": "German Deutsche Mark", "dfi": "DfiStarter", "djf": "Djiboutian Franc", "dkk": "Danish Krone", "doge": "Dogecoin", "dop": "Dominican Peso", "dot": "Polkadot", "dydx": "dYdX", "dzd": "Algerian Dinar", "eek": "Estonian Kroon", "egld": "Elrond", "egp": "Egyptian Pound", "enj": "Enjin Coin", "eos": "EOS", "ern": "Eritrean Nakfa", "esp": "Spanish Peseta", "etb": "Ethiopian Birr", "etc": "Ethereum Classic", "eth": "Ethereum", "eur": "Euro", "fei": "Fei USD", "fil": "Filecoin", "fim": "Finnish Markka", "fjd": "Fijian Dollar", "fkp": "Falkland Island Pound", "flow": "Flow", "flr": "FLARE", "frax": "Frax", "frf": "French Franc", "ftm": "Fantom", "ftt": "FarmaTrust", "fxs": "Frax Share", "gala": "Gala", "gbp": "British Pound", "gel": "Georgian Lari", "ggp": "Guernsey Pound", "ghc": "Ghanaian Cedi", "ghs": "Ghanaian Cedi", "gip": "Gibraltar Pound", "gmd": "Gambian Dalasi", "gmx": "Goldmaxcoin", "gnf": "Guinean Franc", "gno": "Gnosis", "grd": "Greek Drachma", "grt": "The Graph", "gt": "GateToken", "gtq": "Guatemalan Quetzal", "gusd": "Gemini US Dollar", "gyd": "Guyanese Dollar", "hbar": "Hedera", "hkd": "Hong Kong Dollar", "hnl": "Honduran Lempira", "hnt": "Helium", "hot": "Hydro Protocol", "hrk": "Croatian Kuna", "ht": "Huobi Token", "htg": "Haitian Gourde", "huf": "Hungarian Forint", "icp": "Internet Computer", "idr": "Indonesian Rupiah", "iep": "Irish Pound", "ils": "Israeli Shekel", "imp": "Isle of Man Pound", "imx": "Immutable X", "inj": "Injective", "inr": "Indian Rupee", "iqd": "Iraqi Dinar", "irr": "Iranian Rial", "isk": "Icelandic Krona", "itl": "Italian Lira", "jep": "Jersey Pound", "jmd": "Jamaican Dollar", "jod": "Jordanian Dinar", "jpy": "Japanese Yen", "kas": "", "kava": "Kava", "kcs": "Kucoin", "kda": "Kadena", "kes": "Kenyan Shilling", "kgs": "Kyrgyzstani Som", "khr": "Cambodian Riel", "klay": "Klaytn", "kmf": "Comorian Franc", "knc": "Kyber Network Crystals", "kpw": "North Korean Won", "krw": "South Korean Won", "ksm": "Kusama", "kwd": "Kuwaiti Dinar", "kyd": "Caymanian Dollar", "kzt": "Kazakhstani Tenge", "lak": "Lao Kip", "lbp": "Lebanese Pound", "ldo": "Lido DAO Token", "leo": "LEOcoin", "link": "Chainlink", "lkr": "Sri Lankan Rupee", "lrc": "Loopring", "lrd": "Liberian Dollar", "lsl": "Basotho Loti", "ltc": "Litecoin", "ltl": "Lithuanian Litas", "luf": "Luxembourg Franc", "luna": "Terra", "lunc": "", "lvl": "Latvian Lat", "lyd": "Libyan Dinar", "mad": "Moroccan Dirham", "mana": "Mana Coin Decentraland", "matic": "Polygon", "mbx": "MobieCoin", "mdl": "Moldovan Leu", "mga": "Malagasy Ariary", "mgf": "Malagasy Franc", "mina": "Mina", "mkd": "Macedonian Denar", "mkr": "Maker", "mmk": "Burmese Kyat", "mnt": "Mongolian Tughrik", "mop": "Macau Pataca", "mro": "Mauritanian Ouguiya", "mru": "Mauritanian Ouguiya", "mtl": "Maltese Lira", "mur": "Mauritian Rupee", "mvr": "Maldivian Rufiyaa", "mwk": "Malawian Kwacha", "mxn": "Mexican Peso", "mxv": "", "myr": "Malaysian Ringgit", "mzm": "Mozambican Metical", "mzn": "Mozambican Metical", "nad": "Namibian Dollar", "near": "NEAR Protocol", "neo": "NEO", "nexo": "NEXO", "nft": "NFT", "ngn": "Nigerian Naira", "nio": "Nicaraguan Cordoba", "nlg": "Dutch Guilder", "nok": "Norwegian Krone", "npr": "Nepalese Rupee", "nzd": "New Zealand Dollar", "okb": "Okex", "omr": "Omani Rial", "one": "Menlo One", "op": "Optimism", "ordi": "", "pab": "Panamanian Balboa", "paxg": "PAX Gold", "pen": "Peruvian Sol", "pepe": "", "pgk": "Papua New Guinean Kina", "php": "Philippine Peso", "pkr": "Pakistani Rupee", "pln": "Polish Zloty", "pte": "Portuguese Escudo", "pyg": "Paraguayan Guarani", "qar": "Qatari Riyal", "qnt": "Quant", "qtum": "QTUM", "rol": "Romanian Leu", "ron": "Romanian Leu", "rpl": "Rocket Pool", "rsd": "Serbian Dinar", "rub": "Russian Ruble", "rune": "THORChain (ERC20)", "rvn": "Ravencoin", "rwf": "Rwandan Franc", "sand": "The Sandbox", "sar": "Saudi Arabian Riyal", "sbd": "Solomon Islander Dollar", "scr": "Seychellois Rupee", "sdd": "Sudanese Dinar", "sdg": "Sudanese Pound", "sek": "Swedish Krona", "sgd": "Singapore Dollar", "shib": "Shiba Inu", "shp": "Saint Helenian Pound", "sit": "Slovenian Tolar", "skk": "Slovak Koruna", "sle": "Sierra Leonean Leone", "sll": "Sierra Leonean Leone", "snx": "Synthetix Network", "sol": "Solana", "sos": "Somali Shilling", "spl": "Seborgan Luigino", "srd": "Surinamese Dollar", "srg": "Surinamese Guilder", "std": "Sao Tomean Dobra", "stn": "Sao Tomean Dobra", "stx": "Stacks", "sui": "Sui", "svc": "Salvadoran Colon", "syp": "Syrian Pound", "szl": "Swazi Lilangeni", "thb": "Thai Baht", "theta": "Theta", "tjs": "Tajikistani Somoni", "tmm": "Turkmenistani Manat", "tmt": "Turkmenistani Manat", "tnd": "Tunisian Dinar", "ton": "Tokamak Network", "top": "Tongan Pa'anga", "trl": "Turkish Lira", "trx": "TRON", "try": "Turkish Lira", "ttd": "Trinidadian Dollar", "tusd": "True USD", "tvd": "Tuvaluan Dollar", "twd": "Taiwan New Dollar", "twt": "Trust Wallet Token", "tzs": "Tanzanian Shilling", "uah": "Ukrainian Hryvnia", "ugx": "Ugandan Shilling", "uni": "Uniswap", "usd": "US Dollar", "usdc": "USDC", "usdd": "", "usdp": "USDP Stablecoin", "usdt": "Tether", "uyu": "Uruguayan Peso", "uzs": "Uzbekistani Som", "val": "Vatican City Lira", "veb": "Venezuelan Bolívar", "ved": "", "vef": "Venezuelan Bolívar", "ves": "Venezuelan Bolívar", "vet": "Vechain", "vnd": "Vietnamese Dong", "vuv": "Ni-Vanuatu Vatu", "waves": "Waves", "wemix": "WEMIX", "woo": "WOO Network", "wst": "Samoan Tala", "xaf": "Central African CFA Franc BEAC", "xag": "Silver Ounce", "xau": "Gold Ounce", "xaut": "Tether Gold", "xbt": "", "xcd": "East Caribbean Dollar", "xch": "Chia", "xdc": "XDC Network", "xdr": "IMF Special Drawing Rights", "xec": "Eternal Coin", "xem": "NEM", "xlm": "Stellar Lumen", "xmr": "Monero", "xof": "CFA Franc", "xpd": "Palladium Ounce", "xpf": "CFP Franc", "xpt": "Platinum Ounce", "xrp": "Ripple", "xtz": "Tezos", "yer": "Yemeni Rial", "zar": "South African Rand", "zec": "ZCash", "zil": "Zilliqa", "zmk": "Zambian Kwacha", "zmw": "Zambian Kwacha", "zwd": "Zimbabwean Dollar", "zwg": "", "zwl": "Zimbabwean Dollar" } diff --git a/src/tools/index.ts b/src/tools/index.ts index b4c161ef..d07bda17 100644 --- a/src/tools/index.ts +++ b/src/tools/index.ts @@ -2,6 +2,7 @@ import { tool as base64FileConverter } from './base64-file-converter'; import { tool as base64StringConverter } from './base64-string-converter'; import { tool as basicAuthGenerator } from './basic-auth-generator'; import { tool as emailNormalizer } from './email-normalizer'; +import { tool as currencyConverter } from './currency-converter'; import { tool as asciiTextDrawer } from './ascii-text-drawer'; @@ -112,6 +113,7 @@ export const toolsByCategory: ToolCategory[] = [ tomlToYaml, xmlToJson, jsonToXml, + currencyConverter, ], }, { From 393ac40ebb3213f444d1ed988a74778283103801 Mon Sep 17 00:00:00 2001 From: ShareVB Date: Mon, 23 Sep 2024 00:55:09 +0200 Subject: [PATCH 4/5] fix: intersection --- package.json | 2 +- pnpm-lock.yaml | 315 +----------------- .../list-comparer/array-intersection.d.ts | 3 - .../list-comparer.service.test.ts | 4 +- .../list-comparer/list-comparer.service.ts | 13 +- 5 files changed, 20 insertions(+), 317 deletions(-) delete mode 100644 src/tools/list-comparer/array-intersection.d.ts diff --git a/package.json b/package.json index a94d7c3c..30f0c8db 100644 --- a/package.json +++ b/package.json @@ -51,7 +51,6 @@ "@vueuse/head": "^1.0.0", "@vueuse/router": "^10.0.0", "arr-diff": "^4.0.0", - "array-intersection": "^0.1.2", "bcryptjs": "^2.4.3", "change-case": "^4.1.2", "colord": "^2.9.3", @@ -64,6 +63,7 @@ "dompurify": "^3.0.6", "email-normalizer": "^1.0.0", "emojilib": "^3.0.10", + "fast_array_intersect": "^1.1.0", "figlet": "^1.7.0", "figue": "^1.2.0", "fuse.js": "^6.6.2", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 997dcc0a..24794e7b 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -53,9 +53,6 @@ dependencies: arr-diff: specifier: ^4.0.0 version: 4.0.0 - array-intersection: - specifier: ^0.1.2 - version: 0.1.2 bcryptjs: specifier: ^2.4.3 version: 2.4.3 @@ -92,6 +89,9 @@ dependencies: emojilib: specifier: ^3.0.10 version: 3.0.10 + fast_array_intersect: + specifier: ^1.1.0 + version: 1.1.0 figlet: specifier: ^1.7.0 version: 1.7.0 @@ -4167,30 +4167,11 @@ packages: /argparse@2.0.1: resolution: {integrity: sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==} - /arr-diff@2.0.0: - resolution: {integrity: sha512-dtXTVMkh6VkEEA7OhXnN1Ecb8aAGFdZ1LFxtOCoqj4qkyOJMt7+qs6Ahdy6p/NQCPYsRSXXivhSB/J5E9jmYKA==} - engines: {node: '>=0.10.0'} - dependencies: - arr-flatten: 1.1.0 - dev: false - /arr-diff@4.0.0: resolution: {integrity: sha512-YVIQ82gZPGBebQV/a8dar4AitzCQs0jjXwMPZllpXMaGjXPYVUawSxQrRsjhjupyVxEvbHgUmIhKVlND+j02kA==} engines: {node: '>=0.10.0'} dev: false - /arr-filter@1.1.2: - resolution: {integrity: sha512-A2BETWCqhsecSvCkWAeVBFLH6sXEUGASuzkpjL3GR1SlL/PWL6M3J8EAAld2Uubmh39tvkJTqC9LeLHCUKmFXA==} - engines: {node: '>=0.10.0'} - dependencies: - make-iterator: 1.0.1 - dev: false - - /arr-flatten@1.1.0: - resolution: {integrity: sha512-L3hKV5R/p5o81R7O02IGnwpDmkp6E982XhtbuwSe3O4qOtMMMtodicASA1Cny2U+aCXcNpml+m4dPsvsJ3jatg==} - engines: {node: '>=0.10.0'} - dev: false - /array-buffer-byte-length@1.0.0: resolution: {integrity: sha512-LPuwb2P+NrQw3XhxGc36+XSvuBPopovXYTR9Ew++Du9Yb/bx5AzBfrIsBoj0EZUifjQU+sHL21sseZ3jerWO/A==} dependencies: @@ -4198,39 +4179,11 @@ packages: is-array-buffer: 3.0.2 dev: true - /array-every@0.1.2: - resolution: {integrity: sha512-uBIplBaMD8veRNQGg3LzEOUA+apExik+c3dbXoGWYdoZMEsUNFXKjeWBFd49Xicl+GaD3c9xt1Y9qfeQYzu47Q==} - engines: {node: '>=0.10.0'} - dependencies: - make-iterator: 0.1.1 - dev: false - - /array-intersection@0.1.2: - resolution: {integrity: sha512-qSGjtrQwUgu22pN56D7MQ+e/AMZ+FZC2PUMyLR4b4M2N7+JfJAlQMRCnfWt9aB60TIOrtbq4NQ/G3P3MGY6Q+Q==} - engines: {node: '>=0.10.0'} - dependencies: - array-every: 0.1.2 - array-slice: 0.2.3 - array-unique: 0.2.1 - filter-array: 0.2.0 - index-of: 0.1.1 - dev: false - - /array-slice@0.2.3: - resolution: {integrity: sha512-rlVfZW/1Ph2SNySXwR9QYkChp8EkOEiTMO5Vwx60usw04i4nWemkm9RXmQqgkQFaLHsqLuADvjp6IfgL9l2M8Q==} - engines: {node: '>=0.10.0'} - dev: false - /array-union@2.1.0: resolution: {integrity: sha512-HGyxoOTYUyCM6stUe6EJgnd4EoewAI7zMdfqO+kGjnlZmBDz/cR5pf8r/cR4Wq60sL/p0IkcjUEEPwS3GFrIyw==} engines: {node: '>=8'} dev: true - /array-unique@0.2.1: - resolution: {integrity: sha512-G2n5bG5fSUCpnsXz4+8FUkYsGPkNfLn9YvS66U5qbTIXI2Ynnlo4Bi42bWv+omKUCqz+ejzfClwne0alJWJPhg==} - engines: {node: '>=0.10.0'} - dev: false - /arraybuffer.prototype.slice@1.0.2: resolution: {integrity: sha512-yMBKppFur/fbHu9/6USUe03bZ4knMYiwFBcyiaXB8Go0qNehwX6inYPzK9U0NeQvGxKthcmHcaR8P5MStSRBAw==} engines: {node: '>= 0.4'} @@ -4353,15 +4306,6 @@ packages: dependencies: balanced-match: 1.0.2 - /braces@1.8.5: - resolution: {integrity: sha512-xU7bpz2ytJl1bH9cgIurjpg/n8Gohy9GTw81heDYLJQ4RU60dlyJsa+atVF2pI0yMMvKxI9HkKwjePCj5XI1hw==} - engines: {node: '>=0.10.0'} - dependencies: - expand-range: 1.8.2 - preserve: 0.2.0 - repeat-element: 1.1.4 - dev: false - /braces@3.0.2: resolution: {integrity: sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==} engines: {node: '>=8'} @@ -5671,20 +5615,6 @@ packages: strip-final-newline: 2.0.0 dev: true - /expand-brackets@0.1.5: - resolution: {integrity: sha512-hxx03P2dJxss6ceIeri9cmYOT4SRs3Zk3afZwWpOsRqLqprhTR8u++SlC+sFGsQr7WGFPdMF7Gjc1njDLDK6UA==} - engines: {node: '>=0.10.0'} - dependencies: - is-posix-bracket: 0.1.1 - dev: false - - /expand-range@1.8.2: - resolution: {integrity: sha512-AFASGfIlnIbkKPQwX1yHaDjFvh/1gyKJODme52V6IORh69uEYgZp0o9C+qsIGNVEiuuhQU0CSSl++Rlegg1qvA==} - engines: {node: '>=0.10.0'} - dependencies: - fill-range: 2.2.4 - dev: false - /extend-shallow@2.0.1: resolution: {integrity: sha512-zCnTtlxNoAiDc3gqY2aYAWFx7XWWiasuF2K8Me5WbN8otHKTUKBwjPtNpRs/rbUZm7KxWAaNj7P1a/p52GbVug==} engines: {node: '>=0.10.0'} @@ -5692,13 +5622,6 @@ packages: is-extendable: 0.1.1 dev: true - /extglob@0.3.2: - resolution: {integrity: sha512-1FOj1LOwn42TMrruOHGt18HemVnbwAmAak7krWk+wa93KXxGbK+2jpezm+ytJYDaBX0/SPLZFHKM7m+tKobWGg==} - engines: {node: '>=0.10.0'} - dependencies: - is-extglob: 1.0.0 - dev: false - /fast-deep-equal@3.1.3: resolution: {integrity: sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==} @@ -5731,6 +5654,10 @@ packages: resolution: {integrity: sha512-DCXu6Ifhqcks7TZKY3Hxp3y6qphY5SJZmrWMDrKcERSOXWQdMhU9Ig/PYrzyw/ul9jOIyh0N4M0tbC5hodg8dw==} dev: true + /fast_array_intersect@1.1.0: + resolution: {integrity: sha512-/DCilZlUdz2XyNDF+ASs0PwY+RKG9Y4Silp/gbS72Cvbg4oibc778xcecg+pnNyiNHYgh/TApsiDTjpdniyShw==} + dev: false + /fastq@1.15.0: resolution: {integrity: sha512-wBrocU2LCXXa+lWBt8RoIRD89Fi8OdABODa/kEnyeyjS5aZO5/GNvI5sEINADqP/h8M29UHTHUb53sUu5Ihqdw==} dependencies: @@ -5769,37 +5696,12 @@ packages: minimatch: 5.1.6 dev: true - /filename-regex@2.0.1: - resolution: {integrity: sha512-BTCqyBaWBTsauvnHiE8i562+EdJj+oUpkqWp2R1iCoR8f6oo8STRu3of7WJJ0TqWtxN50a5YFpzYK4Jj9esYfQ==} - engines: {node: '>=0.10.0'} - dev: false - - /fill-range@2.2.4: - resolution: {integrity: sha512-cnrcCbj01+j2gTG921VZPnHbjmdAf8oQV/iGeV2kZxGSyfYjjTyY79ErsK1WJWMpw6DaApEX72binqJE+/d+5Q==} - engines: {node: '>=0.10.0'} - dependencies: - is-number: 2.1.0 - isobject: 2.1.0 - randomatic: 3.1.1 - repeat-element: 1.1.4 - repeat-string: 1.6.1 - dev: false - /fill-range@7.0.1: resolution: {integrity: sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==} engines: {node: '>=8'} dependencies: to-regex-range: 5.0.1 - /filter-array@0.2.0: - resolution: {integrity: sha512-f602ANGhuS7zg36nx9l/x4mHdfRhfjIZHLJKG6LE1nnhJgcEM1tS5GIQlVG9QBxHlMpqM5anIhpeanb6xkTi3A==} - engines: {node: '>=0.10.0'} - dependencies: - arr-filter: 1.1.2 - kind-of: 1.1.0 - micromatch: 2.3.11 - dev: false - /find-up@4.1.0: resolution: {integrity: sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==} engines: {node: '>=8'} @@ -5837,18 +5739,6 @@ packages: is-callable: 1.2.7 dev: true - /for-in@1.0.2: - resolution: {integrity: sha512-7EwmXrOjyL+ChxMhmG5lnW9MPt1aIeZEwKhQzoBUdTV0N3zuwWDZYVJatDvZ2OyzPUvdIAZDsCetk3coyMfcnQ==} - engines: {node: '>=0.10.0'} - dev: false - - /for-own@0.1.5: - resolution: {integrity: sha512-SKmowqGTJoPzLO1T0BBJpkfp3EMacCMOuH40hOUbrbzElVktk4DioXVM99QkLCyKoiuOmyjgcWMpVz2xjE7LZw==} - engines: {node: '>=0.10.0'} - dependencies: - for-in: 1.0.2 - dev: false - /form-data@4.0.0: resolution: {integrity: sha512-ETEklSGi5t0QMZuiXoA/Q6vcnxcLQP5vdugSpuAyi6SVGi2clPPp+xgEhuMaHC+zGgn31Kd235W35f7Hykkaww==} engines: {node: '>= 6'} @@ -5998,20 +5888,6 @@ packages: resolve-pkg-maps: 1.0.0 dev: true - /glob-base@0.3.0: - resolution: {integrity: sha512-ab1S1g1EbO7YzauaJLkgLp7DZVAqj9M/dvKlTt8DkXA2tiOIcSMrlVI2J1RZyB5iJVccEscjGn+kpOG9788MHA==} - engines: {node: '>=0.10.0'} - dependencies: - glob-parent: 2.0.0 - is-glob: 2.0.1 - dev: false - - /glob-parent@2.0.0: - resolution: {integrity: sha512-JDYOvfxio/t42HKdxkAYaCiBN7oYiuxykOxKxdaUW5Qn0zaYN3gRQWolrwdnf0shM9/EP0ebuuTmyoXNr1cC5w==} - dependencies: - is-glob: 2.0.1 - dev: false - /glob-parent@5.1.2: resolution: {integrity: sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==} engines: {node: '>= 6'} @@ -6342,11 +6218,6 @@ packages: engines: {node: '>=8'} dev: true - /index-of@0.1.1: - resolution: {integrity: sha512-xjViw4nSlBPC0QZeLRMndEqGQI/xFa64eGbZZV2TEJuFizwEoL3DVVk8BodC58AG6SlixzDkt3Rt3jq3+XGDuA==} - engines: {node: '>=0.10.0'} - dev: false - /inflection@1.13.4: resolution: {integrity: sha512-6I/HUDeYFfuNCVS3td055BaXBwKYuzw7K3ExVMStBowKo9oOAMJIXIHvdyR3iboTCp1b+1i5DSkIZTcwIktuDw==} engines: {'0': node >= 0.4.0} @@ -6433,10 +6304,6 @@ packages: has-tostringtag: 1.0.0 dev: true - /is-buffer@1.1.6: - resolution: {integrity: sha512-NcdALwpXkTm5Zvvbk7owOUSvVvBKDgKP5/ewfXEznmQFfs4ZRmanOeKBTjRVjka3QFoN6XJ+9F3USqfHqTaU5w==} - dev: false - /is-builtin-module@3.2.1: resolution: {integrity: sha512-BSLE3HnV2syZ0FK0iMA/yUGplUeMmNz4AW5fnTunbCIqZi4vG3WjJT9FHMy5D69xmAYBHXQhJdALdpwVxV501A==} engines: {node: '>=6'} @@ -6478,21 +6345,10 @@ packages: hasBin: true dev: true - /is-dotfile@1.0.3: - resolution: {integrity: sha512-9YclgOGtN/f8zx0Pr4FQYMdibBiTaH3sn52vjYip4ZSf6C4/6RfTEZ+MR4GvKhCxdPh21Bg42/WL55f6KSnKpg==} - engines: {node: '>=0.10.0'} - dev: false - - /is-equal-shallow@0.1.3: - resolution: {integrity: sha512-0EygVC5qPvIyb+gSz7zdD5/AAoS6Qrx1e//6N4yv4oNm30kqvdmG66oZFWVlQHUWe5OjP08FuTw2IdT0EOTcYA==} - engines: {node: '>=0.10.0'} - dependencies: - is-primitive: 2.0.0 - dev: false - /is-extendable@0.1.1: resolution: {integrity: sha512-5BMULNob1vgFX6EjQw5izWDxrecWK9AM72rugNr0TFldMOi0fj6Jk+zeKIt0xGj4cEfQIJth4w3OKWOJ4f+AFw==} engines: {node: '>=0.10.0'} + dev: true /is-extendable@1.0.1: resolution: {integrity: sha512-arnXMxT1hhoKo9k1LZdmlNyJdDDfy2v0fXjFlmok4+i8ul/6WlbVge9bhM74OpNPQPMGUToDtz+KXa1PneJxOA==} @@ -6501,11 +6357,6 @@ packages: is-plain-object: 2.0.4 dev: false - /is-extglob@1.0.0: - resolution: {integrity: sha512-7Q+VbVafe6x2T+Tu6NcOf6sRklazEPmBoB3IWk3WdGZM2iGUwU/Oe3Wtq5lSEkDTTlpp8yx+5t4pzO/i9Ty1ww==} - engines: {node: '>=0.10.0'} - dev: false - /is-extglob@2.1.1: resolution: {integrity: sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==} engines: {node: '>=0.10.0'} @@ -6515,13 +6366,6 @@ packages: engines: {node: '>=8'} dev: false - /is-glob@2.0.1: - resolution: {integrity: sha512-a1dBeB19NXsf/E0+FHqkagizel/LQw2DjSQpvQrj3zT+jYPpaUCryPnrQajXKFLCMuf4I6FhRpaGtw4lPrG6Eg==} - engines: {node: '>=0.10.0'} - dependencies: - is-extglob: 1.0.0 - dev: false - /is-glob@4.0.3: resolution: {integrity: sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==} engines: {node: '>=0.10.0'} @@ -6559,18 +6403,6 @@ packages: has-tostringtag: 1.0.0 dev: true - /is-number@2.1.0: - resolution: {integrity: sha512-QUzH43Gfb9+5yckcrSA0VBDwEtDUchrk4F6tfJZQuNzDJbEDB9cZNzSfXGQ1jqmdDY/kl41lUOWM9syA8z8jlg==} - engines: {node: '>=0.10.0'} - dependencies: - kind-of: 3.2.2 - dev: false - - /is-number@4.0.0: - resolution: {integrity: sha512-rSklcAIlf1OmFdyAqbnWTLVelsQ58uvZ66S/ZyawjWqIviTWCjg2PzVGw8WUA+nNuPTqb4wgA+NszrJ+08LlgQ==} - engines: {node: '>=0.10.0'} - dev: false - /is-number@7.0.0: resolution: {integrity: sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==} engines: {node: '>=0.12.0'} @@ -6592,20 +6424,10 @@ packages: isobject: 3.0.1 dev: false - /is-posix-bracket@0.1.1: - resolution: {integrity: sha512-Yu68oeXJ7LeWNmZ3Zov/xg/oDBnBK2RNxwYY1ilNJX+tKKZqgPK+qOn/Gs9jEu66KDY9Netf5XLKNGzas/vPfQ==} - engines: {node: '>=0.10.0'} - dev: false - /is-potential-custom-element-name@1.0.1: resolution: {integrity: sha512-bCYeRA2rVibKZd+s2625gGnGF/t7DSqDs4dP7CrLA1m7jKWz6pps0LpYLJN8Q64HtmPKJ1hrN3nzPNKFEKOUiQ==} dev: true - /is-primitive@2.0.0: - resolution: {integrity: sha512-N3w1tFaRfk3UrPfqeRyD+GYDASU3W5VinKhlORy8EWVf/sIdDL9GAcew85XmktCfH+ngG7SRXEVDoO18WMdB/Q==} - engines: {node: '>=0.10.0'} - dev: false - /is-primitive@3.0.1: resolution: {integrity: sha512-GljRxhWvlCNRfZyORiH77FwdFwGcMO620o37EOYC0ORWdq+WYNVqW0w2Juzew4M+L81l6/QS3t5gkkihyRqv9w==} engines: {node: '>=0.10.0'} @@ -6684,10 +6506,6 @@ packages: is-docker: 2.2.1 dev: true - /isarray@1.0.0: - resolution: {integrity: sha512-VLghIWNM6ELQzo7zwmcg0NmTVyWKYjvIeM83yjp0wRDTmUnrM678fQbcKBo6n2CJEF0szoG//ytg+TKla89ALQ==} - dev: false - /isarray@2.0.5: resolution: {integrity: sha512-xHjhDr3cNBK0BzdUJSPXZntQUx/mwMS5Rw4A7lPJ90XGAO6ISP/ePDNuo0vhqOZU+UD5JoodwCAAoZQd3FeAKw==} dev: true @@ -6696,13 +6514,6 @@ packages: resolution: {integrity: sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==} dev: true - /isobject@2.1.0: - resolution: {integrity: sha512-+OUdGJlgjOBZDfxnDjYYG6zp487z0JGNQq3cYQYg5f5hKR+syHMsaztzGeml/4kGG55CSpKSpWTY+jYGgsHLgA==} - engines: {node: '>=0.10.0'} - dependencies: - isarray: 1.0.0 - dev: false - /isobject@3.0.1: resolution: {integrity: sha512-WhB9zCku7EGTj/HQQRz5aUQEUeoQZH2bWcltRErOpymJ4boYE6wL9Tbr23krRPSZ+C5zqNSrSw+Cc7sZZ4b7vg==} engines: {node: '>=0.10.0'} @@ -6884,21 +6695,10 @@ packages: resolution: {integrity: sha512-UfpWE/VZn0iP50d8cz9NrZLM9lSWhcJ+0Gt/nm4by88UL+J1SiKN8/5dkjMmbEzwL2CAe+67GsegCbIKtbp75A==} dev: false - /kind-of@1.1.0: - resolution: {integrity: sha512-aUH6ElPnMGon2/YkxRIigV32MOpTVcoXQ1Oo8aYn40s+sJ3j+0gFZsT8HKDcxNy7Fi9zuquWtGaGAahOdv5p/g==} - engines: {node: '>=0.10.0'} - dev: false - - /kind-of@3.2.2: - resolution: {integrity: sha512-NOW9QQXMoZGg/oqnVNoNTTIFEIid1627WCffUBJEdMxYApq7mNE7CpzucIPc+ZQg25Phej7IJSmX3hO+oblOtQ==} - engines: {node: '>=0.10.0'} - dependencies: - is-buffer: 1.1.6 - dev: false - /kind-of@6.0.3: resolution: {integrity: sha512-dcS1ul+9tmeD95T+x28/ehLgd9mENa3LsvDTtzm3vyBEO7RPptvAD+t44WVXaUjTBRcrpFeFlC8WCruUR456hw==} engines: {node: '>=0.10.0'} + dev: true /kolorist@1.8.0: resolution: {integrity: sha512-Y+60/zizpJ3HRH8DCss+q95yr6145JXZo46OTpFvDZWLfRCE4qChOyk1b26nMaNpfHHgxagk9dXT5OP0Tfe+dQ==} @@ -7078,20 +6878,6 @@ packages: resolution: {integrity: sha512-s8UhlNe7vPKomQhC1qFelMokr/Sc3AgNbso3n74mVPA5LTZwkB9NlXf4XPamLxJE8h0gh73rM94xvwRT2CVInw==} dev: false - /make-iterator@0.1.1: - resolution: {integrity: sha512-s8tbTxYqrfcXYHAPxUecPxgBnWod7yFShdSOWiV17WRM87bBH2mzr24A4tpUDv9SqebaV6JsPApwKXnisMmMBA==} - engines: {node: '>=0.10.0'} - dependencies: - for-own: 0.1.5 - dev: false - - /make-iterator@1.0.1: - resolution: {integrity: sha512-pxiuXh0iVEq7VM7KMIhs5gxsfxCux2URptUQaXo4iZZJxBAzTPOLE2BumO5dbfVYq/hBJFBR/a1mFDmOx5AGmw==} - engines: {node: '>=0.10.0'} - dependencies: - kind-of: 6.0.3 - dev: false - /map-stream@0.1.0: resolution: {integrity: sha512-CkYQrPYZfWnu/DAmVCpTSX/xHpKZ80eKh2lAkyA6AJTef6bW+6JpbQZN5rofum7da+SyN1bi5ctTm+lTfcCW3g==} dev: true @@ -7124,10 +6910,6 @@ packages: hasBin: true dev: false - /math-random@1.0.4: - resolution: {integrity: sha512-rUxjysqif/BZQH2yhd5Aaq7vXMSx9NdEsQcyA07uEzIvxgI7zIr33gGsh+RU0/XjmQpCW7RsVof1vlkvQVCK5A==} - dev: false - /mathjs@11.9.1: resolution: {integrity: sha512-VdB9ELZ6Dwda13j5d1eCBETmPO8m9qIJETUdfZmTA9cPnXUiIk7UuoAmvxFqtfAe32XYuRugAec2Ndv0/RfRhg==} engines: {node: '>= 14'} @@ -7191,25 +6973,6 @@ packages: - supports-color dev: true - /micromatch@2.3.11: - resolution: {integrity: sha512-LnU2XFEk9xxSJ6rfgAry/ty5qwUTyHYOBU0g4R6tIw5ljwgGIBmiKhRWLw5NpMOnrgUNcDJ4WMp8rl3sYVHLNA==} - engines: {node: '>=0.10.0'} - dependencies: - arr-diff: 2.0.0 - array-unique: 0.2.1 - braces: 1.8.5 - expand-brackets: 0.1.5 - extglob: 0.3.2 - filename-regex: 2.0.1 - is-extglob: 1.0.0 - is-glob: 2.0.1 - kind-of: 3.2.2 - normalize-path: 2.1.1 - object.omit: 2.0.1 - parse-glob: 3.0.4 - regex-cache: 0.4.4 - dev: false - /micromatch@4.0.5: resolution: {integrity: sha512-DMy+ERcEW2q8Z2Po+WNXuw3c5YaUSFjAO5GsJqfEl7UjvtIuFKO6ZrKvcItdy98dwFI2N1tg3zNIdKaQT+aNdA==} engines: {node: '>=8.6'} @@ -7428,13 +7191,6 @@ packages: validate-npm-package-license: 3.0.4 dev: true - /normalize-path@2.1.1: - resolution: {integrity: sha512-3pKJwH184Xo/lnH6oyP1q2pMd7HcypqqmRs91/6/i2CGtWwIKGCkOOMTm/zXbgTEWHw1uNpNi/igc3ePOYHb6w==} - engines: {node: '>=0.10.0'} - dependencies: - remove-trailing-separator: 1.1.0 - dev: false - /normalize-path@3.0.0: resolution: {integrity: sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==} engines: {node: '>=0.10.0'} @@ -7475,14 +7231,6 @@ packages: object-keys: 1.1.1 dev: true - /object.omit@2.0.1: - resolution: {integrity: sha512-UiAM5mhmIuKLsOvrL+B0U2d1hXHF3bFYWIuH1LMpuV2EJEHG1Ntz06PgLEHjm6VFd87NpH8rastvPoyv6UW2fA==} - engines: {node: '>=0.10.0'} - dependencies: - for-own: 0.1.5 - is-extendable: 0.1.1 - dev: false - /object.omit@3.0.0: resolution: {integrity: sha512-EO+BCv6LJfu+gBIF3ggLicFebFLN5zqzz/WWJlMFfkMyGth+oBkhxzDl0wx2W4GkLzuQs/FsSkXZb2IMWQqmBQ==} engines: {node: '>=0.10.0'} @@ -7629,16 +7377,6 @@ packages: is-hexadecimal: 1.0.4 dev: true - /parse-glob@3.0.4: - resolution: {integrity: sha512-FC5TeK0AwXzq3tUBFtH74naWkPQCEWs4K+xMxWZBlKDWu0bVHXGZa+KKqxKidd7xwhdZ19ZNuF2uO1M/r196HA==} - engines: {node: '>=0.10.0'} - dependencies: - glob-base: 0.3.0 - is-dotfile: 1.0.3 - is-extglob: 1.0.0 - is-glob: 2.0.1 - dev: false - /parse-json@5.2.0: resolution: {integrity: sha512-ayCKvm/phCGxOkYRSCM82iDwct8/EonSEgCSxWxD7ve6jHggsFl4fZVQBPRNgQoKiuV/odhFrGzQXZwbifC8Rg==} engines: {node: '>=8'} @@ -7832,11 +7570,6 @@ packages: engines: {node: '>= 0.8.0'} dev: true - /preserve@0.2.0: - resolution: {integrity: sha512-s/46sYeylUfHNjI+sA/78FAHlmIuKqI9wNnzEOGehAlUUYeObv5C2mOinXBjyUyWmJ2SfcS2/ydApH4hTF4WXQ==} - engines: {node: '>=0.10.0'} - dev: false - /prettier@3.0.0: resolution: {integrity: sha512-zBf5eHpwHOGPC47h0zrPyNn+eAEIdEzfywMoYn2XPi0P44Zp0tSq64rq0xAREh4auw2cJZHo9QUob+NqCQky4g==} engines: {node: '>=14'} @@ -8084,15 +7817,6 @@ packages: ret: 0.2.2 dev: false - /randomatic@3.1.1: - resolution: {integrity: sha512-TuDE5KxZ0J461RVjrJZCJc+J+zCkTb1MbH9AQUq68sMhOMcy9jLcb3BrZKgp9q9Ncltdg4QVqWrH02W2EFFVYw==} - engines: {node: '>= 0.10.0'} - dependencies: - is-number: 4.0.0 - kind-of: 6.0.3 - math-random: 1.0.4 - dev: false - /randombytes@2.1.0: resolution: {integrity: sha512-vYl3iOX+4CKUWuxGi9Ukhie6fsqXqS9FE2Zaic4tNFD2N2QQaXOMFbuKK4QmDHC0JO6B1Zp41J0LpT0oR68amQ==} dependencies: @@ -8157,13 +7881,6 @@ packages: '@babel/runtime': 7.23.2 dev: true - /regex-cache@0.4.4: - resolution: {integrity: sha512-nVIZwtCjkC9YgvWkpM55B5rBhBYRZhAaJbgcFYXXsHnbZ9UZI9nnVWYZpBlCqv9ho2eZryPnWrZGsOdPwVWXWQ==} - engines: {node: '>=0.10.0'} - dependencies: - is-equal-shallow: 0.1.3 - dev: false - /regexp-tree@0.1.27: resolution: {integrity: sha512-iETxpjK6YoRWJG5o6hXLwvjYAoW+FEZn9os0PD/b6AP6xQwsa/Y7lCVgIixBbUPMfhu+i2LtdeAqVTgGlQarfA==} hasBin: true @@ -8204,20 +7921,6 @@ packages: jsesc: 0.5.0 dev: true - /remove-trailing-separator@1.1.0: - resolution: {integrity: sha512-/hS+Y0u3aOfIETiaiirUFwDBDzmXPvO+jAfKTitUngIPzdKc6Z0LoFjM/CK5PL4C+eKwHohlHAb6H0VFfmmUsw==} - dev: false - - /repeat-element@1.1.4: - resolution: {integrity: sha512-LFiNfRcSu7KK3evMyYOuCzv3L10TW7yC1G2/+StMjK8Y6Vqd2MG7r/Qjw4ghtuCOjFvlnms/iMmLqpvW/ES/WQ==} - engines: {node: '>=0.10.0'} - dev: false - - /repeat-string@1.6.1: - resolution: {integrity: sha512-PV0dzCYDNfRi1jCDbJzpW7jNNDRuCOG/jI5ctQcGKt/clZD+YcPS3yIlWuTJMmESC8aevCFmWJy5wjAFgNqN6w==} - engines: {node: '>=0.10'} - dev: false - /require-directory@2.1.1: resolution: {integrity: sha512-fGxEI7+wsG9xrvdjsrlmL22OMTTiHRwAMroiEeMgq8gzoLC/PQr7RsRDSTLUg/bZAZtF+TVIkHc6/4RIKrui+Q==} engines: {node: '>=0.10.0'} diff --git a/src/tools/list-comparer/array-intersection.d.ts b/src/tools/list-comparer/array-intersection.d.ts deleted file mode 100644 index e44cc4e6..00000000 --- a/src/tools/list-comparer/array-intersection.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -declare module 'array-intersection' { - export default function intersection(...arrays: any[]):any[]; -} \ No newline at end of file diff --git a/src/tools/list-comparer/list-comparer.service.test.ts b/src/tools/list-comparer/list-comparer.service.test.ts index ae615774..98affcf7 100644 --- a/src/tools/list-comparer/list-comparer.service.test.ts +++ b/src/tools/list-comparer/list-comparer.service.test.ts @@ -51,7 +51,7 @@ describe('list-comparer', () => { }); expect(compareLists({ - list1: '1, 2,3,4,5,4,7,A,A', + list1: '1, 2,3,4,5\n4,7,A,A', list2: '1\n2\n3\n4\n6\n4\n7\na', trimItems: false, ignoreCase: false, @@ -88,8 +88,8 @@ describe('list-comparer', () => { '40', ], same: [ - '20', '30', + '20', ], }); }); diff --git a/src/tools/list-comparer/list-comparer.service.ts b/src/tools/list-comparer/list-comparer.service.ts index 69fb1e3e..c0ca4a45 100644 --- a/src/tools/list-comparer/list-comparer.service.ts +++ b/src/tools/list-comparer/list-comparer.service.ts @@ -1,5 +1,5 @@ import _ from 'lodash'; -import intersection from 'array-intersection'; +import intersect from 'fast_array_intersect'; import diff from 'arr-diff'; export function compareLists({ @@ -15,10 +15,13 @@ export function compareLists({ ignoreCase?: boolean trimItems?: boolean }) { + const splitSep = separator ? `${separator}|` : ''; + const splitRegExp = new RegExp(`(?:${splitSep}\\n)`, 'g'); + const prepareList = (list: string) => _.chain(list ?? '') .thru(text => ignoreCase ? text.toLowerCase() : text) - .split(new RegExp(`[\\n${separator}]`)) + .split(splitRegExp) .map(text => trimItems ? text.trim() : text) .value(); @@ -26,8 +29,8 @@ export function compareLists({ const list2Arr = prepareList(list2); return { - same: intersection(list1Arr, list2Arr), - list2Not1: diff(list2Arr, list1Arr), - list1Not2: diff(list1Arr, list2Arr), + same: [...new Set(intersect([list1Arr, list2Arr]))], + list2Not1: [...new Set(diff(list2Arr, list1Arr))], + list1Not2: [...new Set(diff(list1Arr, list2Arr))], }; } From be586f7331b0a06368ac6d2a3d5eb1ed156fcd85 Mon Sep 17 00:00:00 2001 From: sunnydanu Date: Mon, 4 Nov 2024 23:04:16 +0530 Subject: [PATCH 5/5] chore(components): minor update --- components.d.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/components.d.ts b/components.d.ts index 3460b994..c7505e7a 100644 --- a/components.d.ts +++ b/components.d.ts @@ -196,12 +196,15 @@ declare module '@vue/runtime-core' { NMenu: typeof import('naive-ui')['NMenu'] NP: typeof import('naive-ui')['NP'] NProgress: typeof import('naive-ui')['NProgress'] + NRadio: typeof import('naive-ui')['NRadio'] + NRadioGroup: typeof import('naive-ui')['NRadioGroup'] NScrollbar: typeof import('naive-ui')['NScrollbar'] NSlider: typeof import('naive-ui')['NSlider'] NSpace: typeof import('naive-ui')['NSpace'] NSpin: typeof import('naive-ui')['NSpin'] NStatistic: typeof import('naive-ui')['NStatistic'] 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'] OcrImage: typeof import('./src/tools/ocr-image/ocr-image.vue')['default']