feat(niceToHave): Export list of country codes that implement IBAN by drorheller · Pull Request #1669 · validatorjs/validator.js

@drorheller

Export a list of country codes implementing IBAN
Addressing issue #1570

Checklist

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

@drorHellerNielsen

@codecov

fedeci

Co-authored-by: Federico Ciardi <fed.ciardi@gmail.com>

@drorHellerNielsen

profnandaa

import isISRC from './lib/isISRC';

import isIBAN from './lib/isIBAN';
import isIBAN, { locales as isIBANLocales } from './lib/isIBAN';

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

May be calling them isIBANLocales could be a little misleading, might think it's a validator/function. Perhaps just drop the is?

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@profnandaa I see what you're saying, but I think it's more inline with the rest of the code to call it isIBANLocales

@profnandaa

Check also the failing tests.

@drorHellerNielsen

@drorheller

Check also the failing tests.

@profnandaa pushed test fixes, could you please approve running the workflow?

@drorheller

Hi @fedeci :)
Can you approve the latest changes here?

fedeci

fedeci previously approved these changes Jul 11, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, but I also agree with this comment

import { locales as isAlphanumericLocales } from '../src/lib/isAlphanumeric';
import { locales as isMobilePhoneLocales } from '../src/lib/isMobilePhone';
import { locales as isFloatLocales } from '../src/lib/isFloat';
import { locales as ibanCountryCodes } from '../src/lib/isIBAN';

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

import { locales as ibanCountryCodes } from '../src/lib/isIBAN';
import { locales as isIBANLocales } from '../src/lib/isIBAN';

I would name it isIBANLocales to align to the other one.

@drorHellerNielsen

@drorheller

@fedeci got you, just made the change

fedeci

profnandaa

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks for your contribution.

@drorheller

LGTM, thanks for your contribution.

NP! thanks for your help :)