Skip to content

Commit

Permalink
Change let to const
Browse files Browse the repository at this point in the history
Co-authored-by: Sarhan Aissi <tux-tn@users.noreply.github.com>
  • Loading branch information
nimanthadilz and tux-tn committed Oct 26, 2021
1 parent 06be928 commit 3525238
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/lib/isIdentityCard.js
Original file line number Diff line number Diff line change
Expand Up @@ -161,8 +161,8 @@ const validators = {
return str[12] === ((11 - (sum % 11)) % 10).toString();
},
LK: (str) => {
let old_nic = /^[1-9]\d{8}[vx]$/i;
let new_nic = /^[1-9]\d{11}$/i;
const old_nic = /^[1-9]\d{8}[vx]$/i;
const new_nic = /^[1-9]\d{11}$/i;

if (str.length === 10 && old_nic.test(str)) return true;
else if (str.length === 12 && new_nic.test(str)) return true;
Expand Down

0 comments on commit 3525238

Please sign in to comment.