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 🙏

© 2026 – Pkg Stats / Ryan Hefner

jhvrequest

v0.0.10

Published

jhvrequest is a javascript package for sending SAMP requests to [JHelioviewer](https://www.jhelioviewer.org/)

Readme

npm version code style: prettier

jhvrequest

jhvrequest is a javascript package for sending SAMP requests to JHelioviewer

Usage

Install the package with npm

npm i jhvrequest

Import and make requests.

import { JhvRequestBuilder } from "jhvrequest";

// Load AIA 304 between 2023-01-1 and 2023-01-02 every hour.
let requestBuilder = new JhvRequestBuilder();
requestBuilder
  .SetTimeRange("2023-01-01 00:00:00", "2023-01-02 00:00:00")
  .SetCadence(3600)
  .AddSource("SDO", "AIA 304")
  .Build()
  .Send();

You can add multiple sources to the request:

let requestBuilder = new JhvRequestBuilder();
requestBuilder.SetTimeRange('2023-01-01 00:00:00', '2023-01-02 00:00:00')
    .SetCadence(3600)e
    .AddSource("SDO", "AIA 304")
    .AddSource("SOHO", "LASCO C2")
    .AddSource("SOHO", "LASCO C3")
    .Build().Send();

You can check if JHelioviewer is alive before making any requests

import { IsJhvRunning } from "jhvrequest";

// IsJhvRunning returns true/false
let isJhvRunning = await IsJhvRunning();
if (isJhvRunning) {
  // Send request
} else {
  // Jhv is not running
}

Nodejs vs Browser environments

The dependency sampjs currently only supports a browser environment because it depends on xmlhttprequest and parsing xml via the DOM. But you can get this to work in a nodejs environment with the xmlhttprequest and xmldom package by adding XMLHttpRequest to the the global variable and hooking the xmldom.DOMParser into XMLHttpRequest.prototype.responseXML.

See test/jhvrequest.test.ts as an example.

IsJhvRunning

async function checks if JHelioviewer is running and returns a boolean.

import { IsJhvRunning } from "jhvrequest";
// result is a true/false
let result = await IsJhvRunning();

JhvRequestBuilder

| Method | Description | | -------------------------------------------------- | -------------------------------------------------------------------------------------------- | | SetName(appName) | Sets the application name. This is the name which appears in the JHelioviewer request popup. | | SetTimeRange(start, end) | Set the time range to query. Start and end are strings to remove ambiguity with js dates | | SetCadence(seconds) | Set the time step to use between start and end. in seconds. | | AddSource(observatory, dataset, (Optional) server) | Add an image layer to the request. | | Build() | Construct a JhvRequest from the builder |

JhvRequest

| Method | Description | | ------ | ---------------------------------------------------------------------------------------------------------------------------------------------- | | Send() | Send the request to JHelioviewer. This is an async operation and will complete after the user accepts or declines the request in JHelioviewer. |