import '@johnlindquist/kit';
const prettier = await npm('prettier');
const unformattedJson = await paste();
let result;
try {
result = await prettier.format(unformattedJson, {
parser: 'json',
});
await copy(result);
} catch (err) {
arg("Couldn't format that string: " + err);
}