[CB-4866] sort hooks using localeCompare for strings and numeric compare for numbers