native-duplexpair

WebJar for native-duplexpair

License

License

MIT
Categories

Categories

Native Development Tools
GroupId

GroupId

org.webjars.npm
ArtifactId

ArtifactId

native-duplexpair
Last Version

Last Version

1.0.0
Release Date

Release Date

Type

Type

jar
Description

Description

native-duplexpair
WebJar for native-duplexpair
Project URL

Project URL

http://webjars.org
Source Code Management

Source Code Management

https://github.com/tediousjs/native-duplexpair

Download native-duplexpair

How to add to project

<!-- https://jarcasting.com/artifacts/org.webjars.npm/native-duplexpair/ -->
<dependency>
    <groupId>org.webjars.npm</groupId>
    <artifactId>native-duplexpair</artifactId>
    <version>1.0.0</version>
</dependency>
// https://jarcasting.com/artifacts/org.webjars.npm/native-duplexpair/
implementation 'org.webjars.npm:native-duplexpair:1.0.0'
// https://jarcasting.com/artifacts/org.webjars.npm/native-duplexpair/
implementation ("org.webjars.npm:native-duplexpair:1.0.0")
'org.webjars.npm:native-duplexpair:jar:1.0.0'
<dependency org="org.webjars.npm" name="native-duplexpair" rev="1.0.0">
  <artifact name="native-duplexpair" type="jar" />
</dependency>
@Grapes(
@Grab(group='org.webjars.npm', module='native-duplexpair', version='1.0.0')
)
libraryDependencies += "org.webjars.npm" % "native-duplexpair" % "1.0.0"
[org.webjars.npm/native-duplexpair "1.0.0"]

Dependencies

There are no dependencies for this project. It is a standalone project that does not depend on any other jars.

Project Modules

There are no modules declared in this project.

duplexpair

NPM Version NPM Downloads Build Status Coverage Status Dependency Status

Make a full duplex stream with 2 Duplex endpoints.

Note:

This is a fork of duplexpair, changed to use the "native" Duplex stream that is part of Node.JS instead of the version from the readable-stream package.

Install: npm install native-duplexpair

const DuplexPair = require('native-duplexpair');

const { socket1, socket2 } = new DuplexPair();

socket1.write('Hi');
console.log(socket2.read());  // => <Buffer 48 69>

// Or, using options that are passed to the Duplex constructor:

const { socket1, socket2 } = new DuplexPair({ encoding: 'utf8' });

socket1.write('Hi');
console.log(socket2.read());  // => 'Hi'

License

MIT

org.webjars.npm

Versions

Version
1.0.0