ToInteger.js 268 B

123456789101112
  1. 'use strict';
  2. var ES5ToInteger = require('../5/ToInteger');
  3. var ToNumber = require('./ToNumber');
  4. // https://262.ecma-international.org/6.0/#sec-tointeger
  5. module.exports = function ToInteger(value) {
  6. var number = ToNumber(value);
  7. return ES5ToInteger(number);
  8. };