Created
August 1, 2017 07:40
-
-
Save gucheen/e3df148d49f81e50ae00e3cba13c5796 to your computer and use it in GitHub Desktop.
copy to clipboard in node under macOS
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function pbcopy(data) { | |
const proc = childProcess.spawn('pbcopy'); | |
proc.stdin.write(data); proc.stdin.end(); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment