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

@trengo/axios-progress-bar

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@trengo/axios-progress-bar - npm Package Compare versions

Comparing version 1.2.1 to 1.2.2

.idea/encodings.xml

8

dist/index.js

@@ -111,6 +111,8 @@ (function webpackUniversalModuleDefinition(root, factory) {

function loadProgressBar(config) {
function loadProgressBar() {
var config = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
var instance = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : _axios2.default;
var requestsCounter = 0;
config.delay = config.delay !== undefined ? config.delay : 200;

@@ -138,3 +140,3 @@ var setupStartProgress = function setupStartProgress() {

_nprogress2.default.done();
}, 200);
}, config.delay);
}

@@ -148,3 +150,3 @@ return response;

_nprogress2.default.done();
}, 200);
}, config.delay);
}

@@ -151,0 +153,0 @@ return Promise.reject(error);

{
"name": "@trengo/axios-progress-bar",
"version": "1.2.1",
"version": "1.2.2",
"description": "A fork. Slim progress bar (NProgress) for Web applications that use Axios library for HTTP requests.",

@@ -5,0 +5,0 @@ "main": "dist/index.js",

@@ -8,4 +8,5 @@ import 'nprogress/nprogress.css'

export function loadProgressBar (config, instance = axios) {
export function loadProgressBar (config = {}, instance = axios) {
let requestsCounter = 0
config.delay = config.delay !== undefined ? config.delay : 200

@@ -29,3 +30,3 @@ const setupStartProgress = () => {

if ((--requestsCounter) === 0) {
setTimeout(() => {NProgress.done()}, 200);
setTimeout(() => {NProgress.done()}, config.delay);
}

@@ -37,3 +38,3 @@ return response

if ((--requestsCounter) === 0) {
setTimeout(() => {NProgress.done()}, 200);
setTimeout(() => {NProgress.done()}, config.delay);
}

@@ -40,0 +41,0 @@ return Promise.reject(error)

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