|
Last change
on this file was 9af201e, checked in by MBK <marija.karapandzova@…>, 11 days ago |
|
Fix frontend appearance
|
-
Property mode
set to
100644
|
|
File size:
284 bytes
|
| Line | |
|---|
| 1 | 'use strict';
|
|---|
| 2 | var ceil = Math.ceil;
|
|---|
| 3 | var floor = Math.floor;
|
|---|
| 4 |
|
|---|
| 5 | // `Math.trunc` method
|
|---|
| 6 | // https://tc39.es/ecma262/#sec-math.trunc
|
|---|
| 7 | // eslint-disable-next-line es/no-math-trunc -- safe
|
|---|
| 8 | module.exports = Math.trunc || function trunc(x) {
|
|---|
| 9 | var n = +x;
|
|---|
| 10 | return (n > 0 ? floor : ceil)(n);
|
|---|
| 11 | };
|
|---|
Note:
See
TracBrowser
for help on using the repository browser.