flowthings/websocketFactory.js
function dropCreate(flowthingsWs) {
  return {
    create: function(drop, params, responseHandler, cb) {
      if (typeof params === 'function') {
        cb = responseHandler; responseHandler = params; params = {};
      } else if (!params) {
        params = {};
      }

      if (this.flowId.charAt(0) === '/') {
        drop.path = this.flowId;
      }

      baseWs(flowthingsWs, this.objectType, 'create',
             {flowId: this.flowId, value: drop},
             {msgId: params.msgId, responseHandler: responseHandler, cb: cb});
    },
  };
}
function dropCreate(flowthingsWs) {
  return {
    create: function(drop, params, responseHandler, cb) {
      if (typeof params === 'function') {
        cb = responseHandler; responseHandler = params; params = {};
      } else if (!params) {
        params = {};
      }

      if (this.flowId.charAt(0) === '/') {
        drop.path = this.flowId;
      }

      baseWs(flowthingsWs, this.objectType, 'create',
             {flowId: this.flowId, value: drop},
             {msgId: params.msgId, responseHandler: responseHandler, cb: cb});
    },
  };
}
function dropCreate ( flowthingsWs ) { return { create : function ( drop , params , responseHandler , cb ) { if ( typeof params === 'function' ) { cb = responseHandler ; responseHandler = params ; params = { } ; } else if ( ! params ) { params = { } ; } if ( this . flowId . charAt ( 0 ) === '/' ) { drop . path = this . flowId ; } baseWs ( flowthingsWs , this . objectType , 'create' , { flowId : this . flowId , value : drop } , { msgId : params . msgId , responseHandler : responseHandler , cb : cb } ) ; } , } ; }
can I roll this into the normal create?
can I roll this into the normal create?