src/index.js
function addSocketEmitTypeFlag(spec) {
  for(var i = 0; i < spec.socketEndpoints.length; i++) {
    var endpoint = spec.socketEndpoints[i];
    endpoint.isEmitSelf = endpoint.emitType === "self";
    endpoint.isEmitAll = endpoint.emitType === "all";
    endpoint.isEmitBroadcast = endpoint.emitType === "broadcast";
    endpoint.payload = endpoint.payload.replace(/(\r\n|\n|\r)/gm,"");
  }
  return spec;
}
function addSocketEmitTypeFlag(spec) {
  for(var i = 0; i < spec.socketEndpoints.length; i++) {
    var endpoint = spec.socketEndpoints[i];
    endpoint.isEmitSelf = endpoint.emitType === "self";
    endpoint.isEmitAll = endpoint.emitType === "all";
    endpoint.isEmitBroadcast = endpoint.emitType === "broadcast";
    endpoint.payload = endpoint.payload.replace(/(\r\n|\n|\r)/gm,"");
  }
  return spec;
}
function addSocketEmitTypeFlag ( spec ) { for ( var i = 0 ; i < spec . socketEndpoints . length ; i ++ ) { var endpoint = spec . socketEndpoints [ i ] ; endpoint . isEmitSelf = endpoint . emitType === "self" ; endpoint . isEmitAll = endpoint . emitType === "all" ; endpoint . isEmitBroadcast = endpoint . emitType === "broadcast" ; endpoint . payload = endpoint . payload . replace ( / (\r\n|\n|\r) / gm , "" ) ; } return spec ; }
Adds flags depending on the socket emit type
Adds flags depending on the socket emit type