juspay / juspay/hyperswitch-client-core

Extract Duplicated Code to Utils

Open
#367 5 comments 0 reactions 1 assignee Claimed by @SK1965 View on GitHub
good first issue hacktoberfest
Dominant language
ReScript
Stars
29
Forks
30
Avg merge
2d 3h
Merged PRs (30d)
10

Description

Move duplicated utility functions to centralized utils modules to improve code maintainability and reduce duplication

1. String Conversion Functions (15+ occurrences)

- Pattern: ->Int.toString, ->Float.toString
- Files: CardLoader, CustomPicker, DynamicFields, Pager, TabView,
etc.

2. Card Validation Functions (10+ occurrences)

- Pattern: clearSpaces, getCardBrand, cardType
- Files: CardElement, CardFormUi, PaymentSheetUi,
RequiredFieldsTypes, etc.
- Current: Scattered across multiple files

3. JSON Helper Functions

- Pattern: Similar to existing Utils.res functions (getProp,
getString, getBool)
- Current: Some duplication in different files

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.