More changes based on feedback

This commit is contained in:
Scott Idem
2024-03-03 19:52:42 -05:00
parent 60f6386415
commit 63990bb36a
2 changed files with 35 additions and 11 deletions

View File

@@ -130,6 +130,11 @@ export let iso_datetime_formatter = function iso_datetime_formatter(raw_datetime
}
/* This utility function will add commas to a number. */
function number_w_commas(x) {
return x.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ",");
}
/* This utility function looks for any form data with the prefixed name passed and returns a new object.
* This function is used heavily! Be very careful making changes!!!
@@ -473,6 +478,7 @@ function create_video_element({account_id, base_url, hosted_file_id, filename=nu
export let ae_util = {
iso_datetime_formatter: iso_datetime_formatter,
number_w_commas: number_w_commas,
extract_prefixed_form_data: extract_prefixed_form_data,
process_permission_checks: process_permission_checks,
handle_url_and_message: handle_url_and_message,