text: // Generated by CoffeeScript 1.8.0
  (function() {
    var _,
      __slice = [].slice;
  
    _ = require('underscore');
  
    exports.inferDate = function() {
      var date, datetime, day, hours, inferred, minutes, month, seconds, set, sets, time, year;
      sets = 1 <= arguments.length ? __slice.call(arguments, 0) : [];
      set = _.extend.apply(_, [{}].concat(__slice.call(sets)));
      datetime = set.datetime, date = set.date, time = set.time, year = set.year, month = set.month, day = set.day, hours = set.hours, minutes = set.minutes, seconds = set.seconds;
      if (time == null) {
        time = [hours || '00', minutes || '00', seconds || '00'].join(':');
      }
      if (datetime) {
        inferred = new Date(datetime);
      } else if (date) {
        inferred = new Date("" + date + " " + time);
      } else if (year && month && day) {
        date = [year, month, day].join('-');
        inferred = new Date("" + date + " " + time);
      }
      if (inferred && !isNaN(inferred.valueOf())) {
        return inferred;
      } else {
        return null;
      }
    };
  
    exports.compactObject = _.partial(_.pick, _, _.negate(_.isUndefined));
  
    exports.optional = function(options) {
      if (options.length) {
        return options[0];
      } else {
        return {};
      }
    };
  
    exports.seed = function() {
      var args;
      args = 1 <= arguments.length ? __slice.call(arguments, 0) : [];
      return function(callback) {
        return callback.apply(null, [null].concat(__slice.call(args)));
      };
    };
  
    exports.callback = function(fn) {
      return function() {
        var args, callback, _i;
        args = 2 <= arguments.length ? __slice.call(arguments, 0, _i = arguments.length - 1) : (_i = 0, []), callback = arguments[_i++];
        return callback(null, fn.apply(null, args));
      };
    };
  
    exports.underscored = function(obj) {
      return _.object(_.map(obj, function(value, key) {
        return ['_' + key, value];
      }));
    };
  
  }).call(this);
  