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

axios-timing

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

axios-timing

Axios plugin to measure the actual time it takes for a request to complete

  • 1.0.2
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
65
increased by91.18%
Maintainers
1
Weekly downloads
 
Created
Source

axios-timing

Axios plugin to measure the actual time it takes for a request to complete

Installation

You can install this plugin using Yarn or NPM

yarn add axios-timing
# - or - 
npm install axios-timing

Basic Usage

The example below will log all request times out to the console...

import axios
import axiosTiming from './axios-timing'

axiosTiming(axios, console.log)

Axios Instance

If you are using an axios instance, you should pass this through as the first argument

import axios
import axiosTiming from './axios-timing'

const instance = axios.create()
axiosTiming(instance, console.log)

Custom Callback

You can pass through a custom callback as your second arguement

import axios
import axiosTiming from './axios-timing'

axiosTiming(axios, timeInMs => console.log(`${timeInMs.toFixed()}ms`))

Keywords

FAQs

Package last updated on 09 Jul 2018

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

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