Sha256: 6a9701aef709135b33273667ffc556dcb3e198f6237a56480a78ef3bdba22dd3

Contents?: true

Size: 476 Bytes

Versions: 33

Compression:

Stored size: 476 Bytes

Contents

// A simple fallback when no netcat-compatible adapter is found on the system.
// On average, this is 2-3x slower than netcat, but still much faster than
// spawning a new Ruby process.

const { createConnection } = require("net");

const sock = process.argv[process.argv.length - 1];
const client = createConnection(sock, () => process.stdin.pipe(client));

client.on("data", (data) => process.stdout.write(data));
client.on("error", (error) => {
  console.error(error);
});

Version data entries

33 entries across 33 versions & 2 rubygems

Version Path
rfbeam-0.2.1 node_modules/@prettier/plugin-ruby/src/netcat.js
rfbeam-0.2.0 node_modules/@prettier/plugin-ruby/src/netcat.js
prettier-3.2.2 src/netcat.js
prettier-3.2.1 src/netcat.js
prettier-3.2.0 src/netcat.js
prettier-3.1.2 src/netcat.js
prettier-3.1.1 src/netcat.js
prettier-3.1.0 src/netcat.js
prettier-3.0.0 src/netcat.js
prettier-1.6.1 src/parser/netcat.js
prettier-1.6.0 src/parser/netcat.js
prettier-1.5.5 src/parser/netcat.js
prettier-1.5.4 src/parser/netcat.js