feat: init
This commit is contained in:
17
node_modules/clipboardy/lib/macos.js
generated
vendored
Normal file
17
node_modules/clipboardy/lib/macos.js
generated
vendored
Normal file
@@ -0,0 +1,17 @@
|
||||
import {execa, execaSync} from 'execa';
|
||||
|
||||
const env = {
|
||||
LC_CTYPE: 'UTF-8', // eslint-disable-line unicorn/text-encoding-identifier-case
|
||||
};
|
||||
|
||||
const clipboard = {
|
||||
copy: async options => execa('pbcopy', {...options, env}),
|
||||
async paste(options) {
|
||||
const {stdout} = await execa('pbpaste', {...options, env});
|
||||
return stdout;
|
||||
},
|
||||
copySync: options => execaSync('pbcopy', {...options, env}),
|
||||
pasteSync: options => execaSync('pbpaste', {...options, env}).stdout,
|
||||
};
|
||||
|
||||
export default clipboard;
|
||||
Reference in New Issue
Block a user