uniSoc
Lightweight socket wrapper that works over ws, net, dgram and ipc
Installation
Install the npm package: npm -i unisoc
.
Usage
In NodeJS:
const uniSoc=;
In the browser you have 2 options:
a) Include the bundled version directly in the browser as you would any script, you will then be able to access it on window.uniSoc
, but you'll get an error until you've loaded the dependency, as so:
b) Require the package into another script, initialize it with it's dependencies, then bundle that...
var libbetter=;var unisoc=new libbetter;
...and load that in the browser