wsmock-js:在没有服务器的浏览器中模拟WebSocket

上传者: 42181319 | 上传时间: 2022-05-09 17:38:59 | 文件大小: 140KB | 文件类型: ZIP
wsmock-js 在没有服务器的浏览器中模拟WebSocket。 入门 安装 纱: yarn add wsmock-js --dev 使用[removed]标签: [removed][removed] 定义模拟设置 import wsm from 'wsmock-js' wsm . mock ( { url : 'ws://some.mock.url' , sendInterval : 'onreceive' , receiver ( data ) { // 'data' is sent by webSocket.send in browser console . log ( data ) } , sender ( ) { // Simulating server send this . response

文件下载

资源详情

[{"title":"( 22 个子文件 140KB ) wsmock-js:在没有服务器的浏览器中模拟WebSocket","children":[{"title":"wsmock-js-master","children":[{"title":".travis.yml <span style='color:#111;'> 231B </span>","children":null,"spread":false},{"title":".babelrc <span style='color:#111;'> 32B </span>","children":null,"spread":false},{"title":"package.json <span style='color:#111;'> 1.47KB </span>","children":null,"spread":false},{"title":"test","children":[{"title":"settings.js <span style='color:#111;'> 804B </span>","children":null,"spread":false},{"title":"index.js <span style='color:#111;'> 1.32KB </span>","children":null,"spread":false},{"title":"index.html <span style='color:#111;'> 540B </span>","children":null,"spread":false},{"title":"unit","children":[{"title":"index.spec.js <span style='color:#111;'> 12.79KB </span>","children":null,"spread":false}],"spread":true}],"spread":true},{"title":"webpack.test.config.js <span style='color:#111;'> 960B </span>","children":null,"spread":false},{"title":"LICENSE <span style='color:#111;'> 1.04KB </span>","children":null,"spread":false},{"title":"dist","children":[{"title":"wsmock.js <span style='color:#111;'> 28.48KB </span>","children":null,"spread":false},{"title":"wsmock.min.js <span style='color:#111;'> 11.50KB </span>","children":null,"spread":false}],"spread":true},{"title":"src","children":[{"title":"websocket.js <span style='color:#111;'> 8.57KB </span>","children":null,"spread":false},{"title":"utils.js <span style='color:#111;'> 1.83KB </span>","children":null,"spread":false},{"title":"wsmock.js <span style='color:#111;'> 2.79KB </span>","children":null,"spread":false},{"title":"event-bus.js <span style='color:#111;'> 126B </span>","children":null,"spread":false},{"title":"event-target.js <span style='color:#111;'> 1.22KB </span>","children":null,"spread":false},{"title":"mock-store.js <span style='color:#111;'> 117B </span>","children":null,"spread":false}],"spread":true},{"title":".gitignore <span style='color:#111;'> 39B </span>","children":null,"spread":false},{"title":"webpack.config.js <span style='color:#111;'> 849B </span>","children":null,"spread":false},{"title":"karma.conf.js <span style='color:#111;'> 3.60KB </span>","children":null,"spread":false},{"title":"README.md <span style='color:#111;'> 2.16KB </span>","children":null,"spread":false},{"title":"yarn.lock <span style='color:#111;'> 289.81KB </span>","children":null,"spread":false}],"spread":false}],"spread":true}]

评论信息

免责申明

【只为小站】的资源来自网友分享,仅供学习研究,请务必在下载后24小时内给予删除,不得用于其他任何用途,否则后果自负。基于互联网的特殊性,【只为小站】 无法对用户传输的作品、信息、内容的权属或合法性、合规性、真实性、科学性、完整权、有效性等进行实质审查;无论 【只为小站】 经营者是否已进行审查,用户均应自行承担因其传输的作品、信息、内容而可能或已经产生的侵权或权属纠纷等法律责任。
本站所有资源不代表本站的观点或立场,基于网友分享,根据中国法律《信息网络传播权保护条例》第二十二条之规定,若资源存在侵权或相关问题请联系本站客服人员,zhiweidada#qq.com,请把#换成@,本站将给予最大的支持与配合,做到及时反馈和处理。关于更多版权及免责申明参见 版权及免责申明