npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

network-viewer

v2.4.4

Published

Network-Viewer [![npm version](https://badge.fury.io/js/network-viewer.svg)](https://www.npmjs.com/package/network-viewer) [![Test](https://github.com/saucelabs/network-viewer/actions/workflows/test.yml/badge.svg)](https://github.com/saucelabs/network-vie

Downloads

4,517

Readme

Network-Viewer npm version Test

Introduction

Network-Viewer is a redefined HAR viewer human friendly view of requests which is build with React.

The main purpose of this web application is to help you to view HAR files with many features like filters, search, timline charts etc.

If you are interested contributing to this library, please have a look into our Contributing Guidelines. We love to see any kind of contributions 😊!

Demo

Example

Features

Main features of Network-Viewer are:

  • Import/Upload HAR file
  • Fetch HAR file using queryString url use file=HAR_FILE_URL and to enable CORS pass isCORSEnabled=true (by default CORS is disabled)
  • Search request by URL or body content
  • Filter request by XHR, JS, CSS, Image, Media, Font, Doc, WebSocket, Manifest
  • Errors Only filter to filter request by error status (where status code is greater than or equal to 400)
  • WaterFall chart to display timeline of request which includes
  • Stats at footer to show number of requests, data transfered size, resoruces size, and time metrics like Page Load, DOMContentLoaded and Finished time
  • Request Detail section is available on click of request, response content is available for JSON and XML responses.

How to use

Import/Upload HAR file

Visit https://opensource.saucelabs.com/network-viewer/ and Import your HAR file via drag&drop.

Fetch HAR file

  • file=HAR_FILE_URL as queryString to pass HAR file url
  • isCORSEnabled=trueas queryString to enable CORS support (by default CORS is disabled)

Use it as react library

$ npm install network-viewer

Example

import { NetworkViewer } from 'network-viewer';
<NetworkViewer />

Props

| prop | Type | Default | Values | Description | |:---|:---|:---|:---|:---| | autoHighlightChange | Bool | false | true, false | To allow change request highlight on scrollTimeStamp change when requestDetail is visible | | containerClassName | String | null | | custom-class to overwrite network-viewer's default style | | data | Object | null | { log: { entries: [], pages: [] } } | HAR file data which should contain log.entries and log.pages | | fetchOptions | Object | { withCredentials: true } | | axios request option can be set here to fetch HAR file | | file | String | null | | HAR file URL to fetch requests | | onDataLoaded | Func | null | (data) => {} | This function will receive loaded data on file is being fetched | | onDataError | Func | null | (error) => {} | This function is called when loading data fails | | onRequestSelect | Func | null | (requestDetail) => {} | This function will receive request detail on request select | | options | Object | {showImportHAR: true, showTimeline: false} | | showImportHar: to show/hide import button and modal, showTimeline: to show/hide top timeline of requests | | scrollRequestPosition | String | near | before, after, near | to find and highlight network request by timestamp, near: find request near to timestamp before: find request exactBefore the timestamp after: find request exactAfter the timestamp | | scrollTimeStamp | Number | null | | Find and highlight network request by timestamp |