koa-ws-socket
Advanced tools
Comparing version 0.1.0 to 0.1.1
@@ -275,9 +275,3 @@ import { Server } from 'ws'; | ||
WsSocket.prototype.on = function (event, handler) { | ||
var listeners = this.listeners.get(event); | ||
// If this is a new event then just set it | ||
if (!listeners) { | ||
this.listeners.set(event, [handler]); | ||
this.updateConnections(); | ||
return this; | ||
} | ||
var listeners = this.listeners.get(event) || []; | ||
listeners.push(handler); | ||
@@ -284,0 +278,0 @@ this.listeners.set(event, listeners); |
@@ -280,9 +280,3 @@ (function (global, factory) { | ||
WsSocket.prototype.on = function (event, handler) { | ||
var listeners = this.listeners.get(event); | ||
// If this is a new event then just set it | ||
if (!listeners) { | ||
this.listeners.set(event, [handler]); | ||
this.updateConnections(); | ||
return this; | ||
} | ||
var listeners = this.listeners.get(event) || []; | ||
listeners.push(handler); | ||
@@ -289,0 +283,0 @@ this.listeners.set(event, listeners); |
@@ -1,59 +0,1 @@ | ||
{ | ||
"name": "koa-ws-socket", | ||
"version": "0.1.0", | ||
"description": "Attaches ws sockets to koa using koa-style middleware", | ||
"files": [ | ||
"dist" | ||
], | ||
"main": "dist/koa-ws-socket.umd.js", | ||
"module": "dist/koa-ws-socket.es5.js", | ||
"types": "dist/types/index.d.ts", | ||
"repository": "https://github.com/pbomb/koa-ws-socket.git", | ||
"author": "Matt Parrish <matt.r.parrish@gmail.com>", | ||
"engines": { | ||
"node": ">=6.0.0" | ||
}, | ||
"license": "MIT", | ||
"private": false, | ||
"scripts": { | ||
"add-contributor": "kcd-scripts contributors add", | ||
"prebuild": "rimraf dist && rimraf compiled", | ||
"build": "rollup --config rollup.config.ts --no-clean", | ||
"lint": "tslint -c tslint.json -e **/node_modules/**/* -e **/typings/**/* **/*.ts", | ||
"test": "kcd-scripts test", | ||
"test:cover": "kcd-scripts test --coverage", | ||
"test:update": "npm run test:cover -s -- --updateSnapshot", | ||
"test:build": "kcd-scripts test --no-watch", | ||
"build-and-test": "npm run build -s && npm run test:build -s", | ||
"validate": "kcd-scripts validate lint,build-and-test,test:cover", | ||
"precommit": "kcd-scripts precommit", | ||
"prettier": "prettier --write \"**/*.ts\" \"**/*.js{,on}\"", | ||
"tsc": "tsc" | ||
}, | ||
"devDependencies": { | ||
"@types/jest": "21.1.2", | ||
"@types/koa": "2.0.39", | ||
"@types/koa-compose": "3.2.2", | ||
"@types/ws": "3.2.0", | ||
"kcd-scripts": "0.24.0", | ||
"koa": "2.3.0", | ||
"prettier": "1.7.4", | ||
"rimraf": "2.6.2", | ||
"rollup": "0.50.0", | ||
"rollup-plugin-commonjs": "8.2.1", | ||
"rollup-plugin-node-resolve": "3.0.0", | ||
"rollup-plugin-sourcemaps": "0.4.2", | ||
"rollup-plugin-typescript2": "0.7.0", | ||
"tslint": "5.7.0", | ||
"typescript": "2.5.3", | ||
"ws": "3.2.0" | ||
}, | ||
"peerDependencies": { | ||
"koa": ">=2", | ||
"ws": ">=3" | ||
}, | ||
"dependencies": { | ||
"base64id": "^1.0.0", | ||
"koa-compose": "^4.0.0" | ||
} | ||
} | ||
{"name":"koa-ws-socket","version":"0.1.1","description":"Attaches ws sockets to koa using koa-style middleware","files":["dist"],"main":"dist/koa-ws-socket.umd.js","module":"dist/koa-ws-socket.es5.js","types":"dist/types/index.d.ts","repository":"https://github.com/pbomb/koa-ws-socket.git","author":"Matt Parrish <matt.r.parrish@gmail.com>","engines":{"node":">=6.0.0"},"license":"MIT","private":false,"scripts":{"add-contributor":"kcd-scripts contributors add","prebuild":"rimraf dist && rimraf compiled","build":"rollup --config rollup.config.ts --no-clean","lint":"tslint -c tslint.json -e **/node_modules/**/* -e **/typings/**/* **/*.ts","test":"kcd-scripts test","test:cover":"kcd-scripts test --coverage","test:update":"npm run test:cover -s -- --updateSnapshot","test:build":"kcd-scripts test --no-watch","build-and-test":"npm run build -s && npm run test:build -s","validate":"kcd-scripts validate lint,build-and-test,test:cover","precommit":"kcd-scripts precommit","prettier":"prettier --write \"**/*.ts\" \"**/*.js{,on}\"","tsc":"tsc"},"devDependencies":{"@types/jest":"21.1.2","@types/koa":"2.0.39","@types/koa-compose":"3.2.2","@types/ws":"3.2.0","kcd-scripts":"0.24.0","koa":"2.3.0","prettier":"1.7.4","rimraf":"2.6.2","rollup":"0.50.0","rollup-plugin-commonjs":"8.2.1","rollup-plugin-node-resolve":"3.0.0","rollup-plugin-sourcemaps":"0.4.2","rollup-plugin-typescript2":"0.7.0","tslint":"5.7.0","typescript":"2.5.3","ws":"3.2.0"},"peerDependencies":{"koa":">=2","ws":">=3"},"dependencies":{"base64id":"^1.0.0","koa-compose":"^4.0.0"},"release":{"analyzeCommits":{"releaseRules":[{"type":"refactor","release":"patch"}]}}} |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
4
61687
655