Node-Red configuration
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

math-sign.js 320B

123456789
  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. };