apps-script-utils 2.1.1 Help

isEmail

function isEmail(email: unknown): email is string;

The address is split at a single @: the domain is checked the way isValidDomain checks one, and the local part must be non-empty and free of spaces. It is a format check, not proof that the mailbox exists.

isX and nonX answer a question and never interrupt control flow; requireX and requireNonX hand the value back or throw. The scheme is explained in Validation conventions.

Parameters

Parameter

Type

Description

email

unknown

The value to check, which could be of any type.

Returns

boolean — true when the value is an email address; otherwise false.

In TypeScript the guard narrows email to string inside the branch.

Examples

What passes and what does not

isEmail("user@example.com"); // => true isEmail("first.last@sub.example.co.uk"); // => true isEmail("user@@example.com"); // => false isEmail("user@"); // => false isEmail("example.com"); // => false isEmail(""); // => false

See also

Source

src/lang/string/isEmail.ts

23 September 2026

This documentation was generated with AI (Claude) from the library's source code.