macos.js 379 B

123456789101112131415
  1. 'use strict';
  2. const execa = require('execa');
  3. const env = {
  4. ...process.env,
  5. LC_CTYPE: 'UTF-8'
  6. };
  7. module.exports = {
  8. copy: async options => execa('pbcopy', {...options, env}),
  9. paste: async options => execa.stdout('pbpaste', {...options, env}),
  10. copySync: options => execa.sync('pbcopy', {...options, env}),
  11. pasteSync: options => execa.sync('pbpaste', {...options, env})
  12. };