cornucopia icon indicating copy to clipboard operation
cornucopia copied to clipboard

Issue: Duplicate helper function across taxonomy components

Open Suresh-Krishna-P opened this issue 7 months ago • 2 comments

The helper function FormatToDoubleDigitSearchstring is duplicated in both:

  • webAppCardTaxonomy.svelte
  • mobileAppCardTaxonomy.svelte

Expected Shared logic should be extracted to a common utility module and imported in both components.

Why

  • Reduces code duplication
  • Improves maintainability
  • Prevents inconsistent behavior if the formatting logic ever changes

Proposed fix

  • Create src/lib/utils/formatSearchString.ts or similar
  • Move FormatToDoubleDigitSearchstring there
  • Import and use it from both components

Suresh-Krishna-P avatar Apr 06 '26 13:04 Suresh-Krishna-P

@sydseter, I’d be happy to work on this and open a PR if you could assign it to me.

Suresh-Krishna-P avatar Apr 06 '26 13:04 Suresh-Krishna-P

@Suresh-Krishna-P I have assigned you. Thank you for your time.

sydseter avatar Apr 14 '26 04:04 sydseter