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

rc-slider

Package Overview
Dependencies
Maintainers
3
Versions
188
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

rc-slider - npm Package Compare versions

Comparing version 3.6.0 to 3.6.2

14

lib/Slider.js

@@ -93,8 +93,3 @@ 'use strict';

if (props.range && upperBound === lowerBound) {
if (lowerBound === max) {
recent = 'lowerBound';
}
if (upperBound === min) {
recent = 'upperBound';
}
recent = lowerBound === max ? 'lowerBound' : 'upperBound';
} else {

@@ -303,5 +298,4 @@ recent = 'upperBound';

key: 'getPrecision',
value: function getPrecision() {
var props = this.props;
var stepString = props.step.toString();
value: function getPrecision(step) {
var stepString = step.toString();
var precision = 0;

@@ -359,3 +353,3 @@ if (stepString.indexOf('.') >= 0) {

return step !== null ? parseFloat(closestPoint.toFixed(this.getPrecision())) : closestPoint;
return step !== null ? parseFloat(closestPoint.toFixed(this.getPrecision(step))) : closestPoint;
}

@@ -362,0 +356,0 @@ }, {

@@ -19,3 +19,8 @@ 'use strict';

var _warning = require('warning');
var _warning2 = _interopRequireDefault(_warning);
function calcPoints(vertical, marks, dots, step, min, max) {
(0, _warning2['default'])(dots ? step > 0 : true, '`Slider[step]` should be a positive number in order to make Slider[dots] work.');
var points = Object.keys(marks).map(parseFloat);

@@ -22,0 +27,0 @@ if (dots) {

{
"name": "rc-slider",
"version": "3.6.0",
"version": "3.6.2",
"description": "slider ui component for react",

@@ -55,4 +55,5 @@ "keywords": [

"rc-tooltip": "3.x",
"rc-util": "3.x"
"rc-util": "3.x",
"warning": "^2.1.0"
}
}
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