Skip to main content
Home
This release is 1 version behind 0.3.1 — the latest version of @upyo/core. Jump to latest

@upyo/core@0.3.0-dev.36+e7618f03
Built and signed on GitHub Actions

Simple email sending library for Node.js, Deno, Bun, and edge functions

This package works with Cloudflare Workers, Node.js, Deno, Bun, Browsers
This package works with Cloudflare Workers
This package works with Node.js
This package works with Deno
This package works with Bun
This package works with Browsers
JSR Score
100%
Published
2 months ago (0.3.0-dev.36+e7618f03)
function isEmailAddress
isEmailAddress(email: unknown): email is EmailAddress

Type guard function that checks if a given value is a valid email address.

Examples

Example 1

import { isEmailAddress } from "@upyo/core/address";

const userInput = "user@example.com";
if (isEmailAddress(userInput)) {
  // TypeScript now knows userInput is EmailAddress type
  console.log(userInput); // Type: `${string}@${string}`
}

Parameters

email: unknown

The value to check

Return Type

email is EmailAddress

true if the value is a valid email address, false otherwise

New Ticket: Report package

Please provide a reason for reporting this package. We will review your report and take appropriate action.

Please review the JSR usage policy before submitting a report.

Add Package

deno add jsr:@upyo/core

Import symbol

import { isEmailAddress } from "@upyo/core/address";
or

Import directly with a jsr specifier

import { isEmailAddress } from "jsr:@upyo/core/address";

Add Package

pnpm i jsr:@upyo/core
or (using pnpm 10.8 or older)
pnpm dlx jsr add @upyo/core

Import symbol

import { isEmailAddress } from "@upyo/core/address";

Add Package

yarn add jsr:@upyo/core
or (using Yarn 4.8 or older)
yarn dlx jsr add @upyo/core

Import symbol

import { isEmailAddress } from "@upyo/core/address";

Add Package

vlt install jsr:@upyo/core

Import symbol

import { isEmailAddress } from "@upyo/core/address";

Add Package

npx jsr add @upyo/core

Import symbol

import { isEmailAddress } from "@upyo/core/address";

Add Package

bunx jsr add @upyo/core

Import symbol

import { isEmailAddress } from "@upyo/core/address";