Browse Source

copy: wrap `copy-paste` and make it `await`-friendly

master
Guillermo Rauch 9 years ago
parent
commit
d18df46201
  1. 10
      lib/copy.js

10
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();
});
});
}
Loading…
Cancel
Save