source:
trip-planner-front/node_modules/core-js/internals/to-integer.js
Last change on this file was 6a3a178, checked in by , 3 years ago | |
---|---|
|
|
File size: 249 bytes |
Rev | Line | |
---|---|---|
[6a3a178] | 1 | var ceil = Math.ceil; |
2 | var floor = Math.floor; | |
3 | ||
4 | // `ToInteger` abstract operation | |
5 | // https://tc39.es/ecma262/#sec-tointeger | |
6 | module.exports = function (argument) { | |
7 | return isNaN(argument = +argument) ? 0 : (argument > 0 ? floor : ceil)(argument); | |
8 | }; |
Note:
See TracBrowser
for help on using the repository browser.