Skip to content

Instantly share code, notes, and snippets.

@angusgibbs
angusgibbs / capitalize_name.js
Last active October 25, 2021 14:46
Example HubSpot custom code action snippets
/**
* Capitalizes the first letter of every part of a contact's first and last name.
*
* Examples:
* - angus -> Angus
* - ANGUS A. -> Angus A.
* - O'connor -> O'Connor
*/
const FIRSTNAME_PROP = "firstname";
const LASTNAME_PROP = "lastname";