Global

Members

(constant) addUserToList

Add a new user to the list of users

Source:

(constant) countUsers

Counts the number of users

Source:

(constant) filterUsers

Filters users by criteria

Source:

(constant) formatUserCountText

Formats the text for the user count display

Source:

(constant) loadUsersFromStorage

Loads the list of users from localStorage

Source:

(constant) saveUsersToStorage

Saves the list of users to localStorage

Source:

(constant) sortUsersByName

Sorts users by name

Source:

(constant) userExists

Checks if a user already exists (by email)

Source:

Methods

calculateAge()

Source:

validateEmail(email) → {Object|null}

Validate an email address

Parameters:
Name Type Description
email string

The email address to validate.

Source:
Returns:

An error object if the email address is invalid, or null if it is valid.

Type
Object | null

validateIdentity(name) → {Object|null}

Validate first name and last name

Parameters:
Name Type Description
name string

The name to validate.

Source:
Returns:

An error object if the first name or last name is invalid, or null if they are valid.

Type
Object | null

validatePostalCode(postalCode) → {Object|null}

Validate a French postal code

Parameters:
Name Type Description
postalCode string

The postal code to validate.

Source:
Returns:

An error object if the postal code is invalid, or null if it is valid.

Type
Object | null