How to use the is-stream.duplex function in is-stream

To help you get started, we’ve selected a few is-stream examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github nodertc / dtls / src / node_modules / lib / socket.js View on Github external
function connect(options = {}, callback) {
  if (!isDuplexStream(options.socket)) {
    options.socket = unicast.createSocket(options);
  }

  const socket = new Socket(options);
  socket.connect(callback);

  return socket;
}

is-stream

Check if something is a Node.js stream

MIT
Latest version published 10 months ago

Package Health Score

79 / 100
Full package analysis