How to use is-negative-zero - 3 common examples

To help you get started, we’ve selected a few is-negative-zero examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github NSFI / ppfish-components / es / components / InputNumber / src / index.js View on Github external
value: function formatWrapper(num) {
      // http://2ality.com/2012/03/signedzero.html
      // https://github.com/ant-design/ant-design/issues/9439
      if (isNegativeZero(num)) {
        return '-0';
      }

      if (this.props.formatter) {
        return this.props.formatter(num);
      }

      return num;
    }
  }, {
github NSFI / ppfish-components / source / components / InputNumber / src / index.js View on Github external
formatWrapper(num) {
    // http://2ality.com/2012/03/signedzero.html
    // https://github.com/ant-design/ant-design/issues/9439
    if (isNegativeZero(num)) {
      return '-0';
    }
    if (this.props.formatter) {
      return this.props.formatter(num);
    }
    return num;
  }

is-negative-zero

Is this value negative zero? === will lie to you

MIT
Latest version published 2 months ago

Package Health Score

74 / 100
Full package analysis

Popular is-negative-zero functions