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

react-top-loading-bar

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-top-loading-bar - npm Package Compare versions

Comparing version 1.0.9 to 1.1.0

16

dist/index.es.js

@@ -88,2 +88,3 @@ import React, { Component } from 'react';

};
/** @deprecated this method contains a typo, use continuousStart */
_this.continousStart = function (startingValue) {

@@ -104,2 +105,17 @@ var random = startingValue || _this.randomInt(20, 30);

};
_this.continuousStart = function (startingValue) {
var random = startingValue || _this.randomInt(20, 30);
_this.setState({ progress: random });
var interval = setInterval(function () {
if (_this.state.progress < 90) {
var random_2 = _this.randomInt(2, 10);
if (!_this.mounted) return false;
_this.setState({ progress: _this.state.progress + random_2 }, function () {
_this.onProgressChange();
});
} else {
clearInterval(interval);
}
}, 1000);
};
_this.staticStart = function (startingValue) {

@@ -106,0 +122,0 @@ var random = startingValue || _this.randomInt(30, 50);

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

};
/** @deprecated this method contains a typo, use continuousStart */
_this.continousStart = function (startingValue) {

@@ -109,2 +110,17 @@ var random = startingValue || _this.randomInt(20, 30);

};
_this.continuousStart = function (startingValue) {
var random = startingValue || _this.randomInt(20, 30);
_this.setState({ progress: random });
var interval = setInterval(function () {
if (_this.state.progress < 90) {
var random_2 = _this.randomInt(2, 10);
if (!_this.mounted) return false;
_this.setState({ progress: _this.state.progress + random_2 }, function () {
_this.onProgressChange();
});
} else {
clearInterval(interval);
}
}, 1000);
};
_this.staticStart = function (startingValue) {

@@ -111,0 +127,0 @@ var random = startingValue || _this.randomInt(30, 50);

@@ -94,2 +94,3 @@ (function (global, factory) {

};
/** @deprecated this method contains a typo, use continuousStart */
_this.continousStart = function (startingValue) {

@@ -110,2 +111,17 @@ var random = startingValue || _this.randomInt(20, 30);

};
_this.continuousStart = function (startingValue) {
var random = startingValue || _this.randomInt(20, 30);
_this.setState({ progress: random });
var interval = setInterval(function () {
if (_this.state.progress < 90) {
var random_2 = _this.randomInt(2, 10);
if (!_this.mounted) return false;
_this.setState({ progress: _this.state.progress + random_2 }, function () {
_this.onProgressChange();
});
} else {
clearInterval(interval);
}
}, 1000);
};
_this.staticStart = function (startingValue) {

@@ -112,0 +128,0 @@ var random = startingValue || _this.randomInt(30, 50);

11

package.json
{
"name": "react-top-loading-bar",
"version": "1.0.9",
"version": "1.1.0",
"description": "A very simple, highly customisable react top loader component.",

@@ -53,3 +53,3 @@ "author": {

"start": "rollup -c -w",
"prepare": "yarn run build",
"prepare": "npm run build",
"predeploy": "cd example && yarn install && yarn run build",

@@ -65,2 +65,4 @@ "deploy": "gh-pages -d example/build"

"@svgr/rollup": "^2.4.1",
"@types/react": "^16.9.1",
"@types/react-dom": "^16.8.5",
"babel-core": "^6.26.3",

@@ -99,6 +101,3 @@ "babel-eslint": "^8.2.5",

],
"dependencies": {
"@types/react": "^16.8.23",
"@types/react-dom": "^16.8.4"
}
"dependencies": {}
}

@@ -51,4 +51,4 @@ # react-top-loading-bar

/>
<button onClick={() => this.LoadingBar.continousStart()}>
Start Continous Bar Loading
<button onClick={() => this.LoadingBar.continuousStart()}>
Start Continuous Bar Loading
</button>

@@ -122,3 +122,4 @@ <button onClick={() => this.LoadingBar.staticStart()}>

| decrease(value) | Number | Decreases a value to the loading indicator. |
| continousStart(startingValue) | Number (optional) | Starts the loading indicator with a random starting value between 20-30, then repetitively after an interval of 1s increases it by a random value between 2-10. This continues until it reaches 90% of the indicator's width. |
| continousStart(startingValue) [typo - deprecated, use continuousStart] | Number (optional) | Starts the loading indicator with a random starting value between 20-30, then repetitively after an interval of 1s increases it by a random value between 2-10. This continues until it reaches 90% of the indicator's width. |
| continuousStart(startingValue) | Number (optional) | Starts the loading indicator with a random starting value between 20-30, then repetitively after an interval of 1s increases it by a random value between 2-10. This continues until it reaches 90% of the indicator's width. |
| staticStart(startingValue) | Number (optional) | Starts the loading indicator with a random starting value between 30-50. |

@@ -125,0 +126,0 @@ | complete() | | Makes the loading indicator reach 100% of his width and then fade. |

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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