Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

rc-input-number

Package Overview
Dependencies
Maintainers
3
Versions
218
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

rc-input-number - npm Package Compare versions

Comparing version 2.5.7 to 2.5.8

26

lib/InputNumber.js

@@ -31,2 +31,4 @@ 'use strict';

onBlur: _react2['default'].PropTypes.func,
max: _react2['default'].PropTypes.number,
min: _react2['default'].PropTypes.number,
step: _react2['default'].PropTypes.oneOfType([_react2['default'].PropTypes.number, _react2['default'].PropTypes.string])

@@ -199,5 +201,13 @@ },

upStep: function upStep(val) {
var stepNum = this.props.step;
var _props4 = this.props;
var step = _props4.step;
var min = _props4.min;
var precisionFactor = this.getPrecisionFactor();
var result = (precisionFactor * val + precisionFactor * stepNum) / precisionFactor;
var result = undefined;
if (typeof val === 'number') {
result = (precisionFactor * val + precisionFactor * step) / precisionFactor;
} else {
result = min === -Infinity ? step : min;
}
return this.toPrecisionAsStep(result);

@@ -207,5 +217,13 @@ },

downStep: function downStep(val) {
var stepNum = this.props.step;
var _props5 = this.props;
var step = _props5.step;
var min = _props5.min;
var precisionFactor = this.getPrecisionFactor();
var result = (precisionFactor * val - precisionFactor * stepNum) / precisionFactor;
var result = undefined;
if (typeof val === 'number') {
result = (precisionFactor * val - precisionFactor * step) / precisionFactor;
} else {
result = min === -Infinity ? -step : min;
}
return this.toPrecisionAsStep(result);

@@ -212,0 +230,0 @@ },

2

package.json
{
"name": "rc-input-number",
"version": "2.5.7",
"version": "2.5.8",
"description": "input-number ui component for react",

@@ -5,0 +5,0 @@ "keywords": [

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc