diff --git a/lib/copy.js b/lib/copy.js new file mode 100644 index 0000000..01e12a8 --- /dev/null +++ b/lib/copy.js @@ -0,0 +1,10 @@ +import { copy as _copy } from 'copy-paste'; + +export default function copy (text) { + return new Promise((resolve, reject) => { + _copy(text, (err) => { + if (err) return reject(err); + resolve(); + }); + }); +}