The string formatter function in column_formatter.js is currently considerably long and performs multiple tasks. The function can be refactored to made it more cohesive and focused, with a clearer scope. The existing functionality can be split into separate functions.