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.5.1 node_modules/@prettier/plugin-ruby/src/netcat.js
rfbeam-0.5.0 node_modules/@prettier/plugin-ruby/src/netcat.js
rfbeam-0.4.10 node_modules/@prettier/plugin-ruby/src/netcat.js
rfbeam-0.4.9 node_modules/@prettier/plugin-ruby/src/netcat.js
rfbeam-0.4.8 node_modules/@prettier/plugin-ruby/src/netcat.js
rfbeam-0.4.7 node_modules/@prettier/plugin-ruby/src/netcat.js
rfbeam-0.4.6 node_modules/@prettier/plugin-ruby/src/netcat.js
rfbeam-0.4.5 node_modules/@prettier/plugin-ruby/src/netcat.js
rfbeam-0.4.4 node_modules/@prettier/plugin-ruby/src/netcat.js
rfbeam-0.4.3 node_modules/@prettier/plugin-ruby/src/netcat.js
rfbeam-0.4.2 node_modules/@prettier/plugin-ruby/src/netcat.js
rfbeam-0.4.1 node_modules/@prettier/plugin-ruby/src/netcat.js
rfbeam-0.4.0 node_modules/@prettier/plugin-ruby/src/netcat.js
rfbeam-0.3.5 node_modules/@prettier/plugin-ruby/src/netcat.js
rfbeam-0.3.4 node_modules/@prettier/plugin-ruby/src/netcat.js
rfbeam-0.3.3 node_modules/@prettier/plugin-ruby/src/netcat.js
rfbeam-0.3.2 node_modules/@prettier/plugin-ruby/src/netcat.js
rfbeam-0.3.1 node_modules/@prettier/plugin-ruby/src/netcat.js
rfbeam-0.3.0 node_modules/@prettier/plugin-ruby/src/netcat.js
rfbeam-0.2.2 node_modules/@prettier/plugin-ruby/src/netcat.js