Remove trailing commas from JS