UNPKG

studiocms

Version:

Astro Native CMS for AstroDB. Built from the ground up by the Astro community.

25 lines (24 loc) 568 B
const notificationOptions = [ "account_updated", "page_updated", "page_deleted", "new_page", "folder_updated", "folder_deleted", "new_folder", "user_updated", "user_deleted", "new_user" ]; function getEnabledNotificationCheckboxes(formData) { const data = Object.fromEntries(formData.entries()); return notificationOptions.filter((option) => data[option] === "on"); } function formatNotificationOptions(options) { return options.join(", "); } export { formatNotificationOptions, getEnabledNotificationCheckboxes, notificationOptions };