From 25938a11471a75222f469884d88a63e4960d0f9e Mon Sep 17 00:00:00 2001 From: Sefinek Date: Mon, 25 Dec 2023 00:42:45 +0100 Subject: [PATCH] Update README.md --- README.md | 38 ++++++++++++++++++++++++-------------- 1 file changed, 24 insertions(+), 14 deletions(-) diff --git a/README.md b/README.md index 2746a66..40cf93b 100644 --- a/README.md +++ b/README.md @@ -20,6 +20,19 @@ yarn add email-validator ``` +## 🤔 » Node.js example +```js +const emailValidator = require('email-validator'); +const testEmail = 'contact@sefinek.net'; + +if (emailValidator.test(testEmail)) { + console.log(`Email ${testEmail} is valid!`); +} else { + console.log(`Email ${testEmail} is NOT valid!`); +} +``` + + ## 🌍 » Browser ### cdn.sefinek.net ``` @@ -36,28 +49,25 @@ https://cdn.jsdelivr.net/gh/sefinek24/email-validator@latest/dist/validator.js + email-validator - +

email-validator

+ + + ``` -## 🤔 » Example -```js -const emailValidator = require('email-validator'); -const testEmail = 'contact@sefinek.net'; - -if (emailValidator.test(testEmail)) { - console.log(`Email ${testEmail} is valid!`); -} else { - console.log(`Email ${testEmail} is NOT valid!`); -} -``` - - ## ⭐ » Thank you If you find this module helpful, please consider giving the [repository a star](https://github.com/sefinek24/email-validator). For any questions or issues, please create a new [Issue](https://github.com/sefinek24/email-validator/issues/new).