File: darwin.js

package info (click to toggle)
node-copy-paste 1.5.3-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 108 kB
  • sloc: javascript: 165; makefile: 2
file content (9 lines) | stat: -rw-r--r-- 390 bytes parent folder | download
1
2
3
4
5
6
7
8
9
exports.copy = { command: "pbcopy", args: [], env: { LANG: "en_US.UTF-8" } };
exports.paste = { command: "pbpaste", args: [] };
exports.paste.full_command = exports.paste.command;
exports.encode = function(str) { return Buffer.from(str, "utf8"); };
exports.decode = function(chunks) {
	if(!Array.isArray(chunks)) { chunks = [ chunks ]; }

	return Buffer.concat(chunks).toString("utf8");
};