Sign Up for Free

RunKit +

Try any Node.js package right in your browser

This is a playground to test code. It runs a full Node.js environment and already has all of npm’s 1,000,000+ packages pre-installed, including @mac-xiang/socket with all npm packages installed. Try it out:

var socket = require("@mac-xiang/socket")

This service is provided by RunKit and is not affiliated with npm, Inc or the package authors.

@mac-xiang/socket v1.0.0

适用于vue/uniapp 的socket.io 封装,如不想支持vue.则注释掉vue部分代码即可(index.ts 文件底部).记得编译哦.

RunKit is a free, in-browser JavaScript dev environment for prototyping Node.js code, with every npm package installed. Sign up to share your code.
Sign Up for Free