normalizeVersion = function(version) {
        if (!version) {
          return;
        }

        if (_.isString(version.channel)) {
          version.channel = {
            name: version.channel
          };
        }

        if (typeof version.flavor === 'string') {
          version.flavor = {
            name: version.flavor
          };
        }

        if (!_.isArrayLike(version.assets)) {
          version.assets = [];
        }

        if (new Date(version.availability) < new Date(version.createdAt)) {
          version.availability = version.createdAt;
        }

        return version;
      }
Normalize the version object returned by sails over SocketIO.
Note: Sails will not populate related models on update
Specifically:
 - The channel parameter will sometimes only contain the channel name.
 - The assets parameter will not be included if empty.
 - The availability parameter will sometimes be dated before the createdAt date.
@param  {Object} version Unnormalized version object
@return {Object}         Normalized version object