Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
commands.mobileSetPasteboard = async function mobileSetPasteboard (opts = {}) {
if (!this.isSimulator()) {
throw new Error('Setting pasteboard content is not supported on real devices');
}
const {content, encoding} = opts;
if (!content) {
throw new Error('Pasteboard content is mandatory to set');
}
return await setPasteboard(this.opts.udid, content, encoding);
};