source: imaps-frontend/node_modules/es-abstract/2020/ToInteger.js@ d565449

main
Last change on this file since d565449 was d565449, checked in by stefan toskovski <stefantoska84@…>, 4 weeks ago

Update repo after prototype presentation

  • Property mode set to 100644
File size: 331 bytes
Line 
1'use strict';
2
3var ES5ToInteger = require('../5/ToInteger');
4
5var ToNumber = require('./ToNumber');
6
7// https://262.ecma-international.org/11.0/#sec-tointeger
8
9module.exports = function ToInteger(value) {
10 var number = ToNumber(value);
11 if (number !== 0) {
12 number = ES5ToInteger(number);
13 }
14 return number === 0 ? 0 : number;
15};
Note: See TracBrowser for help on using the repository browser.