File tree Expand file tree Collapse file tree 2 files changed +2
-6
lines changed Expand file tree Collapse file tree 2 files changed +2
-6
lines changed Original file line number Diff line number Diff line change 55import EventEmitter from 'wolfy87-eventemitter' ;
66import Queue from './queue' ;
77import Socket from './socket' ;
8- import { contains , uniqueId } from './utils' ;
8+ import { uniqueId } from './utils' ;
99
1010const DDP_VERSION = '1' ;
1111const PUBLIC_EVENTS = [
@@ -79,7 +79,7 @@ export default class DDP extends EventEmitter {
7979 // Reply with a `pong` message to prevent the server from
8080 // closing the connection
8181 this . socket . send ( { msg : 'pong' , id : message . id } ) ;
82- } else if ( contains ( PUBLIC_EVENTS , message . msg ) ) {
82+ } else if ( PUBLIC_EVENTS . includes ( message . msg ) ) {
8383 this . emit ( message . msg , message ) ;
8484 }
8585 } ) ;
Original file line number Diff line number Diff line change @@ -6,10 +6,6 @@ export function uniqueId() {
66 return ( i ++ ) . toString ( ) ;
77}
88
9- export function contains ( array , element ) {
10- return array . indexOf ( element ) !== - 1 ;
11- }
12-
139export function hashPassword ( password ) {
1410 return {
1511 digest : SHA256 ( password ) . toString ( ) ,
You can’t perform that action at this time.
0 commit comments