Here's a really quick one I decided to spin up this morning:

Install title-case

let { titleCase } = await npm("title-case");
let selectedText = await getSelectedText();
let value = titleCase(selectedText);
await setSelectedText(value);

...also, a tiny variant on the above I like to call The Proper Namifier™

let { titleCase } = await npm("title-case");
let selectedText = await getSelectedText();
let value = titleCase(selectedText) + '™';
await setSelectedText(value);