Skip to content

Conversation

@dacalalic
Copy link

Adds an optional strip boolean to isIBAN:

  • When strip is true (default), behavior is unchanged (whitespace/hyphens/non-alphanumerics are removed before validation).
  • When strip is false, input is validated as-is (still uppercased), allowing callers to handle normalization themselves.

Updates:

  • Code: minimal change in hasValidIbanFormat and hasValidIbanChecksum to respect options.strip.
  • Tests: added cases for { strip: false } (no stripping) and with whitelist/blacklist combos.
  • Docs: clarified JSDoc and README entry for isIBAN(str, options) to document strip (default true).

References
This change doesn’t modify the IBAN format or checksum; it only adds an optional strip flag (default true) to control input normalization.

Checklist

  • PR contains only changes related; no stray files, etc.
  • README updated (where applicable)
  • Tests written (where applicable)
  • References provided in PR (where applicable)

@codecov
Copy link

codecov bot commented Oct 14, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 100.00%. Comparing base (6f436be) to head (e38f6fd).

Additional details and impacted files
@@            Coverage Diff            @@
##            master     #2605   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files          114       114           
  Lines         2536      2539    +3     
  Branches       642       644    +2     
=========================================
+ Hits          2536      2539    +3     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants