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

react-progressbar

Package Overview
Dependencies
Maintainers
1
Versions
18
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-progressbar - npm Package Compare versions

Comparing version 1.4.6 to 15.4.1

51

lib/index.js

@@ -15,2 +15,6 @@ 'use strict';

var _propTypes = require('prop-types');
var _propTypes2 = _interopRequireDefault(_propTypes);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }

@@ -26,21 +30,2 @@

var PropTypes = {
completed: function completed(props, propName) {
if (typeof props[propName] !== 'number') return Progress.throwError('Invalid Props: "completed" should ∈ ℝ ');
if (props[propName] < 0 || props[propName] > 100) {
return Progress.throwError('Invalid Props: "completed" should be between 0 and 100');
}
},
color: _react2.default.PropTypes.string,
animation: _react2.default.PropTypes.number,
height: _react2.default.PropTypes.oneOfType([_react2.default.PropTypes.string, _react2.default.PropTypes.number])
};
var defaultProps = {
completed: 0,
color: '#0BD318',
animation: 200,
height: 10
};
var Progress = function (_React$Component) {

@@ -84,2 +69,7 @@ _inherits(Progress, _React$Component);

}
}], [{
key: 'throwError',
value: function throwError() {
return new (Function.prototype.bind.apply(Error, [null].concat(Array.prototype.slice.call(arguments))))();
}
}]);

@@ -90,10 +80,19 @@

;
Progress.propTypes = PropTypes;
Progress.throwError = function () {
return new (Function.prototype.bind.apply(Error, [null].concat(Array.prototype.slice.call(arguments))))();
Progress.propTypes = {
completed: function completed(props, propName) {
if (typeof props[propName] !== 'number') return Progress.throwError('Invalid Props: "completed" should ∈ ℝ ');
if (props[propName] < 0 || props[propName] > 100) {
return Progress.throwError('Invalid Props: "completed" should be between 0 and 100');
}
},
color: _propTypes2.default.string,
animation: _propTypes2.default.number,
height: _propTypes2.default.oneOfType([_propTypes2.default.string, _propTypes2.default.number])
};
Progress.defaultProps = defaultProps;
Progress.defaultProps = {
completed: 0,
color: '#0BD318',
animation: 200,
height: 10
};
exports.default = Progress;
{
"name": "react-progressbar",
"version": "1.4.6",
"version": "15.4.1",
"description": "Basic progress bar in React",

@@ -23,3 +23,3 @@ "main": "lib/index.js",

"coveralls": "^2.11.15",
"enzyme": "^2.6.0",
"enzyme": "^2.9.1",
"expect": "^1.20.2",

@@ -33,2 +33,3 @@ "jsdom": "^9.8.3",

"react-dom": "^15.4.1",
"react-test-renderer": "^15.6.1",
"sinon": "^1.17.6"

@@ -70,3 +71,8 @@ },

"react": "^15.0.1"
},
"dependencies": {
"prop-types": "^15.5.10",
"react": "^15.6.1",
"react-dom": "^15.6.1"
}
}

@@ -15,6 +15,6 @@ # react-progressbar

Usage
=====
# Usage
Simply `require('react-progressbar')` and pass in `completed` property as a number between 0 and 100.

@@ -58,6 +58,6 @@

# Donation
License
=======
If this project help you reduce time to develop, you can give me a cup of coffee 🍵 :)
MIT
[![paypal](https://www.paypalobjects.com/en_US/i/btn/btn_donateCC_LG.gif)](https://www.paypal.me/AbdennourT/1)
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