Created
August 14, 2019 15:21
-
-
Save pilgreen/4775e7e7f2088ed1cfc3a974e68052e6 to your computer and use it in GitHub Desktop.
Copy output to the clipboard in Node
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) { | |
var proc = require('child_process').spawn('pbcopy'); | |
proc.stdin.write(data); proc.stdin.end(); | |
} | |
pbcopy(somObject); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment