TEST

Benchmark created on


Test runner

Ready to run.

Testing in
TestOps/sec
A
 const IbanUtils = {
  maskIban: (iban) => {
    const firstPart = iban.slice(0, 4)
    const lastPart = iban.slice(-3)
    const maskedLength = iban.length - 7
    const maskedPart = '*'.repeat(maskedLength)

    return `${firstPart}${maskedPart}${lastPart}`
  },
}

IbanUtils.maskIban('FR763000600001123456189')

ready
B
const maskIban= (iban) => {
    const firstPart = iban.slice(0, 4)
    const lastPart = iban.slice(-3)
    const maskedLength = iban.length - 7
    const maskedPart = '*'.repeat(maskedLength)

    return `${firstPart}${maskedPart}${lastPart}`
}

maskIban('FR763000600001123456189')


ready

Revisions

You can edit these tests or add more tests to this page by appending /edit to the URL.