dist/modules/to.js
function toEpoch(val, def) {
    return toDefault((is_1.isDate(val) && val.getTime()), def);
}
function toEpoch(val, def) {
    return toDefault((is_1.isDate(val) && val.getTime()), def);
}
function toEpoch ( val , def ) { return toDefault ( ( is_1 . isDate ( val ) && val . getTime ( ) ) , def ) ; }
To Epoch
Converts a Date type to an epoch.

@param val the date value to convert.
@param def optional default value when null.
To Epoch Converts a Date type to an epoch .