source:
trip-planner-front/node_modules/core-js/internals/to-integer.js@
1ad8e64
Last change on this file since 1ad8e64 was 6a3a178, checked in by , 3 years ago | |
---|---|
|
|
File size: 249 bytes |
Line | |
---|---|
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.