floor.js 265 B

1234567891011121314
  1. 'use strict';
  2. // var modulo = require('./modulo');
  3. var $floor = Math.floor;
  4. // http://262.ecma-international.org/11.0/#eqn-floor
  5. module.exports = function floor(x) {
  6. // return x - modulo(x, 1);
  7. if (typeof x === 'bigint') {
  8. return x;
  9. }
  10. return $floor(x);
  11. };