var assign = require('lodash.assign');

var properties = require('./properties');
var refEncoders = require('./refEncoders');
var test = require('./test');
var types = require('./types');

var utilities = module.exports = assign({
    convertDateToSerial: function JSDateToExcelDate(inDate) {
        // assumes date given is GMT
        if (!(inDate instanceof Date)) inDate = new Date(inDate);
        var returnDateTime = 25569.0 + (inDate.getTime() ? (inDate / 86400000) : -25568.0);
        return returnDateTime;
    },
    dirname: function (path) {
        return path ? path.split('/').slice(0, -1).join('/') : '';
    },
    slugify: function (str) {
        if (!str) return '';
        return String(str).toLowerCase().replace(/[^\w\s]+/g, '').replace(/[^a-z0-9]+/g, '-');
    },
    upperFirst: function (str) {
        if (!str || typeof str !== 'string') return '';
        return str.charAt(0).toUpperCase() + str.slice(1);
    }
}, properties, refEncoders, test, types);

@@ -1,44 +1,4 @@
-var assign = require('lodash.assign');%0A%0A
 var 
@@ -179,15 +179,8 @@
 s = 
-assign(
 %7B%0A  
@@ -893,18 +893,20 @@
 %0A    %7D%0A%7D
-, 
+;%0A%0A%5B
 properti
@@ -933,11 +933,149 @@
 t, types
+%5D.forEach(function (methods) %7B%0A    Object.keys(methods).forEach(function (method) %7B%0A        utilities%5Bmethod%5D = methods%5Bmethod%5D;%0A    %7D);%0A%7D
 );%0A

drop assign in utilities main