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