number_util.js 232 B

123456789101112131415
  1. /**
  2. * Created by chen on 2017/7/5.
  3. */
  4. Number.prototype.toDecimal = function (ADigit) {
  5. return parseFloat(this.toFixed(ADigit));
  6. };
  7. var number_util = {
  8. isNumber : function (obj) {
  9. return obj === +obj;
  10. },
  11. }