UNPKG

@topgroup/diginext

Version:

A BUILD SERVER & CLI to deploy apps to any Kubernetes clusters.

12 lines (11 loc) 465 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.extractNameFromEmail = void 0; function extractNameFromEmail(email) { // Split the email at the "@" symbol and take the first part let name = email.split("@")[0] || ""; // Replace dots, underscores, an‰d hyphens with spaces to normalize the name name = name.replace(/\.|_|-/g, " ").trim(); return name; } exports.extractNameFromEmail = extractNameFromEmail;