/
home2
/
dakshskx
/
test.dakshadesign.com
/
node_modules
/
validator
/
es
/
lib
/
/home2/dakshskx/test.dakshadesign.com/node_modules/validator/es/lib
mkdir
upload
Name
Size
Mode
Actions
util/
-
0755
rm
alpha.js
6734
0644
edit
dl
rm
blacklist.js
186
0644
edit
dl
rm
contains.js
522
0644
edit
dl
rm
equals.js
149
0644
edit
dl
rm
escape.js
310
0644
edit
dl
rm
isAbaRouting.js
683
0644
edit
dl
rm
isAfter.js
473
0644
edit
dl
rm
isAlpha.js
912
0644
edit
dl
rm
isAlphanumeric.js
947
0644
edit
dl
rm
isAscii.js
242
0644
edit
dl
rm
isBase32.js
504
0644
edit
dl
rm
isBase58.js
302
0644
edit
dl
rm
isBase64.js
647
0644
edit
dl
rm
isBefore.js
367
0644
edit
dl
rm
isBIC.js
555
0644
edit
dl
rm
isBoolean.js
484
0644
edit
dl
rm
isBtcAddress.js
251
0644
edit
dl
rm
isByteLength.js
842
0644
edit
dl
rm
isCreditCard.js
1530
0644
edit
dl
rm
isCurrency.js
3036
0644
edit
dl
rm
isDataURI.js
982
0644
edit
dl
rm
isDate.js
5439
0644
edit
dl
rm
isDecimal.js
840
0644
edit
dl
rm
isDivisibleBy.js
202
0644
edit
dl
rm
isEAN.js
2153
0644
edit
dl
rm
isEmail.js
5883
0644
edit
dl
rm
isEmpty.js
346
0644
edit
dl
rm
isEthereumAddress.js
176
0644
edit
dl
rm
isFloat.js
788
0644
edit
dl
rm
isFQDN.js
1785
0644
edit
dl
rm
isFullWidth.js
234
0644
edit
dl
rm
isHalfWidth.js
233
0644
edit
dl
rm
isHash.js
421
0644
edit
dl
rm
isHexadecimal.js
189
0644
edit
dl
rm
isHexColor.js
214
0644
edit
dl
rm
isHSL.js
984
0644
edit
dl
rm
isIBAN.js
6454
0644
edit
dl
rm
isIdentityCard.js
12284
0644
edit
dl
rm
isIMEI.js
949
0644
edit
dl
rm
isIn.js
1102
0644
edit
dl
rm
isInt.js
825
0644
edit
dl
rm
isIP.js
2702
0644
edit
dl
rm
isIPRange.js
1051
0644
edit
dl
rm
isISBN.js
1437
0644
edit
dl
rm
isISIN.js
1584
0644
edit
dl
rm
isISO4217.js
1575
0644
edit
dl
rm
isISO6346.js
1176
0644
edit
dl
rm
isISO6391.js
1283
0644
edit
dl
rm
isISO8601.js
2182
0644
edit
dl
rm
isISO31661Alpha2.js
1849
0644
edit
dl
rm
isISO31661Alpha3.js
2037
0644
edit
dl
rm
isISRC.js
237
0644
edit
dl
rm
isISSN.js
704
0644
edit
dl
rm
isJSON.js
846
0644
edit
dl
rm
isJWT.js
376
0644
edit
dl
rm
isLatLong.js
908
0644
edit
dl
rm
isLength.js
1006
0644
edit
dl
rm
isLicensePlate.js
4863
0644
edit
dl
rm
isLocale.js
3493
0644
edit
dl
rm
isLowercase.js
149
0644
edit
dl
rm
isLuhnNumber.js
624
0644
edit
dl
rm
isMACAddress.js
1527
0644
edit
dl
rm
isMagnetURI.js
404
0644
edit
dl
rm
isMailtoURI.js
4483
0644
edit
dl
rm
isMD5.js
159
0644
edit
dl
rm
isMimeType.js
1930
0644
edit
dl
rm
isMobilePhone.js
8972
0644
edit
dl
rm
isMongoId.js
206
0644
edit
dl
rm
isMultibyte.js
252
0644
edit
dl
rm
isNumeric.js
398
0644
edit
dl
rm
isOctal.js
165
0644
edit
dl
rm
isPassportNumber.js
3450
0644
edit
dl
rm
isPort.js
156
0644
edit
dl
rm
isPostalCode.js
2540
0644
edit
dl
rm
isRFC3339.js
1057
0644
edit
dl
rm
isRgbColor.js
842
0644
edit
dl
rm
isSemVer.js
597
0644
edit
dl
rm
isSlug.js
212
0644
edit
dl
rm
isStrongPassword.js
2849
0644
edit
dl
rm
isSurrogatePair.js
205
0644
edit
dl
rm
isTaxID.js
41731
0644
edit
dl
rm
isTime.js
619
0644
edit
dl
rm
isUppercase.js
149
0644
edit
dl
rm
isURL.js
5817
0644
edit
dl
rm
isUUID.js
781
0644
edit
dl
rm
isVariableWidth.js
256
0644
edit
dl
rm
isVAT.js
7038
0644
edit
dl
rm
isWhitelisted.js
253
0644
edit
dl
rm
ltrim.js
361
0644
edit
dl
rm
matches.js
281
0644
edit
dl
rm
normalizeEmail.js
6336
0644
edit
dl
rm
rtrim.js
624
0644
edit
dl
rm
stripLow.js
288
0644
edit
dl
rm
toBoolean.js
247
0644
edit
dl
rm
toDate.js
184
0644
edit
dl
rm
toFloat.js
132
0644
edit
dl
rm
toInt.js
151
0644
edit
dl
rm
trim.js
144
0644
edit
dl
rm
unescape.js
498
0644
edit
dl
rm
whitelist.js
187
0644
edit
dl
rm
Edit:
/home2/dakshskx/test.dakshadesign.com/node_modules/validator/es/lib/normalizeEmail.js
(6336B)
import merge from './util/merge'; var default_normalize_email_options = { // The following options apply to all email addresses // Lowercases the local part of the email address. // Please note this may violate RFC 5321 as per http://stackoverflow.com/a/9808332/192024). // The domain is always lowercased, as per RFC 1035 all_lowercase: true, // The following conversions are specific to GMail // Lowercases the local part of the GMail address (known to be case-insensitive) gmail_lowercase: true, // Removes dots from the local part of the email address, as that's ignored by GMail gmail_remove_dots: true, // Removes the subaddress (e.g. "+foo") from the email address gmail_remove_subaddress: true, // Conversts the googlemail.com domain to gmail.com gmail_convert_googlemaildotcom: true, // The following conversions are specific to Outlook.com / Windows Live / Hotmail // Lowercases the local part of the Outlook.com address (known to be case-insensitive) outlookdotcom_lowercase: true, // Removes the subaddress (e.g. "+foo") from the email address outlookdotcom_remove_subaddress: true, // The following conversions are specific to Yahoo // Lowercases the local part of the Yahoo address (known to be case-insensitive) yahoo_lowercase: true, // Removes the subaddress (e.g. "-foo") from the email address yahoo_remove_subaddress: true, // The following conversions are specific to Yandex // Lowercases the local part of the Yandex address (known to be case-insensitive) yandex_lowercase: true, // The following conversions are specific to iCloud // Lowercases the local part of the iCloud address (known to be case-insensitive) icloud_lowercase: true, // Removes the subaddress (e.g. "+foo") from the email address icloud_remove_subaddress: true }; // List of domains used by iCloud var icloud_domains = ['icloud.com', 'me.com']; // List of domains used by Outlook.com and its predecessors // This list is likely incomplete. // Partial reference: // https://blogs.office.com/2013/04/17/outlook-com-gets-two-step-verification-sign-in-by-alias-and-new-international-domains/ var outlookdotcom_domains = ['hotmail.at', 'hotmail.be', 'hotmail.ca', 'hotmail.cl', 'hotmail.co.il', 'hotmail.co.nz', 'hotmail.co.th', 'hotmail.co.uk', 'hotmail.com', 'hotmail.com.ar', 'hotmail.com.au', 'hotmail.com.br', 'hotmail.com.gr', 'hotmail.com.mx', 'hotmail.com.pe', 'hotmail.com.tr', 'hotmail.com.vn', 'hotmail.cz', 'hotmail.de', 'hotmail.dk', 'hotmail.es', 'hotmail.fr', 'hotmail.hu', 'hotmail.id', 'hotmail.ie', 'hotmail.in', 'hotmail.it', 'hotmail.jp', 'hotmail.kr', 'hotmail.lv', 'hotmail.my', 'hotmail.ph', 'hotmail.pt', 'hotmail.sa', 'hotmail.sg', 'hotmail.sk', 'live.be', 'live.co.uk', 'live.com', 'live.com.ar', 'live.com.mx', 'live.de', 'live.es', 'live.eu', 'live.fr', 'live.it', 'live.nl', 'msn.com', 'outlook.at', 'outlook.be', 'outlook.cl', 'outlook.co.il', 'outlook.co.nz', 'outlook.co.th', 'outlook.com', 'outlook.com.ar', 'outlook.com.au', 'outlook.com.br', 'outlook.com.gr', 'outlook.com.pe', 'outlook.com.tr', 'outlook.com.vn', 'outlook.cz', 'outlook.de', 'outlook.dk', 'outlook.es', 'outlook.fr', 'outlook.hu', 'outlook.id', 'outlook.ie', 'outlook.in', 'outlook.it', 'outlook.jp', 'outlook.kr', 'outlook.lv', 'outlook.my', 'outlook.ph', 'outlook.pt', 'outlook.sa', 'outlook.sg', 'outlook.sk', 'passport.com']; // List of domains used by Yahoo Mail // This list is likely incomplete var yahoo_domains = ['rocketmail.com', 'yahoo.ca', 'yahoo.co.uk', 'yahoo.com', 'yahoo.de', 'yahoo.fr', 'yahoo.in', 'yahoo.it', 'ymail.com']; // List of domains used by yandex.ru var yandex_domains = ['yandex.ru', 'yandex.ua', 'yandex.kz', 'yandex.com', 'yandex.by', 'ya.ru']; // replace single dots, but not multiple consecutive dots function dotsReplacer(match) { if (match.length > 1) { return match; } return ''; } export default function normalizeEmail(email, options) { options = merge(options, default_normalize_email_options); var raw_parts = email.split('@'); var domain = raw_parts.pop(); var user = raw_parts.join('@'); var parts = [user, domain]; // The domain is always lowercased, as it's case-insensitive per RFC 1035 parts[1] = parts[1].toLowerCase(); if (parts[1] === 'gmail.com' || parts[1] === 'googlemail.com') { // Address is GMail if (options.gmail_remove_subaddress) { parts[0] = parts[0].split('+')[0]; } if (options.gmail_remove_dots) { // this does not replace consecutive dots like example..email@gmail.com parts[0] = parts[0].replace(/\.+/g, dotsReplacer); } if (!parts[0].length) { return false; } if (options.all_lowercase || options.gmail_lowercase) { parts[0] = parts[0].toLowerCase(); } parts[1] = options.gmail_convert_googlemaildotcom ? 'gmail.com' : parts[1]; } else if (icloud_domains.indexOf(parts[1]) >= 0) { // Address is iCloud if (options.icloud_remove_subaddress) { parts[0] = parts[0].split('+')[0]; } if (!parts[0].length) { return false; } if (options.all_lowercase || options.icloud_lowercase) { parts[0] = parts[0].toLowerCase(); } } else if (outlookdotcom_domains.indexOf(parts[1]) >= 0) { // Address is Outlook.com if (options.outlookdotcom_remove_subaddress) { parts[0] = parts[0].split('+')[0]; } if (!parts[0].length) { return false; } if (options.all_lowercase || options.outlookdotcom_lowercase) { parts[0] = parts[0].toLowerCase(); } } else if (yahoo_domains.indexOf(parts[1]) >= 0) { // Address is Yahoo if (options.yahoo_remove_subaddress) { var components = parts[0].split('-'); parts[0] = components.length > 1 ? components.slice(0, -1).join('-') : components[0]; } if (!parts[0].length) { return false; } if (options.all_lowercase || options.yahoo_lowercase) { parts[0] = parts[0].toLowerCase(); } } else if (yandex_domains.indexOf(parts[1]) >= 0) { if (options.all_lowercase || options.yandex_lowercase) { parts[0] = parts[0].toLowerCase(); } parts[1] = 'yandex.ru'; // all yandex domains are equal, 1st preferred } else if (options.all_lowercase) { // Any other address parts[0] = parts[0].toLowerCase(); } return parts.join('@'); }
Save
cmd:
run