Skip to main content
Version: 0.1.8

separateEmail

This method separates different parts of an email and returns it separately in an object.

Params

separateEmail(str);
  • str → str An email in the form of a string that you want to separate its parts

Returns

{
isHaveCapitalLetter: true,
isHaveSmallLetter: true,
isHaveNumber: true,
isHaveCharacter: true,
passwordLength: 14,
capitalLetterCount: 3,
smallLetterCount: 7,
numberCount: 2,
characterCount: 2
}
  • Object → An object that contains information about the contents of str

Usage

separateEmail("arian.koochak@gmail.com");
/* {
emailUsername: "arian.koochak",
emailSymbol: "@",
emailMailServer: "gmail",
emailMailServerUrl: "gmail.com",
emailDomain: ".com",
} */

separateEmail("arian.koochak.com");
/* {} */
Take care

If the input is not a valid email. Then an empty object is returned