From 6e1632f01cc33a6f14024c348222aad1b8215356 Mon Sep 17 00:00:00 2001 From: Hosmel Quintana Date: Mon, 23 Sep 2019 09:56:14 -0600 Subject: [PATCH] update prettier config --- .prettierrc | 3 +-- src/index.js | 10 +++++----- 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/.prettierrc b/.prettierrc index 7f4f0ca..45ff50f 100644 --- a/.prettierrc +++ b/.prettierrc @@ -1,6 +1,5 @@ { "singleQuote": true, "bracketSpacing": false, - "parser": "babel", - "semi": false + "parser": "babel" } diff --git a/src/index.js b/src/index.js index 5ab3b8f..a455e7b 100644 --- a/src/index.js +++ b/src/index.js @@ -1,12 +1,12 @@ export const dnic = dni => { // ([0-6][0-9]{2})-([0-2][0-9]|3[0-1])(0[1-9]|1[0-2])([0-9]{2})-([0-9]{4}[A-X]) - const regex = /([0-6][d]{2})-([0-2][d]|3[0-1])(0[1-9]|1[0-2])([d]{2})-([d]{4}[A-X])/ + const regex = /([0-6][d]{2})-([0-2][d]|3[0-1])(0[1-9]|1[0-2])([d]{2})-([d]{4}[A-X])/; - return regex.test(dni) -} + return regex.test(dni); +}; export const dnicWithDateValidation = dni => { if (!dni) { - return null + return null; } -} +};