Javascript Number before()
before()
Number.prototype.before = function () { var value = parseInt(this.toString().split(".")[0], 10) return value ? value : 0 }