ToInteger.js 273 B

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