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

@markwharton/wol

v1.0.1

Published

WhosOnLocation (WOL) API client

Downloads

202

Readme

@markwharton/wol

WhosOnLocation API client for staff presence, visitor management, and location data.

Install

npm install @markwharton/wol

Quick Start

import { WOLClient } from '@markwharton/wol';

const client = new WOLClient({
  apiKey: 'your-api-key',
  cache: {},   // enable caching with defaults
  retry: {},   // enable retry with defaults
});

// Validate credentials
const validation = await client.validateApiKey();
if (!validation.ok) throw new Error(validation.error);

// Get onsite staff
const result = await client.getStaff({ query: 'onsite_status:onsite' });
if (result.ok) {
  for (const staff of result.data!) {
    console.log(staff.name, staff.onsiteStatus);
  }
}

Configuration

| Field | Type | Default | Description | |-------|------|---------|-------------| | apiKey | string | required | API key for APIKEY authentication | | baseUrl | string | WOL API URL | Override API base URL | | onRequest | callback | - | Debug callback for each API request | | cache | WOLCacheConfig | disabled | Enable caching with optional TTL overrides | | cacheInstance | Cache | - | Custom cache backend (e.g., LayeredCache) | | retry | RetryConfig | disabled | Enable retry for 429/503 with exponential backoff | | rateLimitPerSecond | number | 1.67 | Client-side rate limiting (~100/min). Set 0 to disable | | timeZone | string | - | Time zone for API requests (e.g., 'Pacific/Auckland') |

Cache TTLs

Pass cache: {} to enable with defaults:

| Key | Default | Description | |-----|---------|-------------| | staffTtl | 1 min | Staff members | | visitorEventsTtl | 1 min | Visitor events | | visitorGroupsTtl | 5 min | Visitor groups | | locationsTtl | 5 min | Locations |

Methods

Staff

| Method | Parameters | Returns | Description | |--------|------------|---------|-------------| | validateApiKey | - | Result<void> | Validate API key | | getStaff | options? | Result<WOLStaff[]> | Get staff members (cached) | | getStaffMember | staffId: number | Result<WOLStaff> | Get single staff member (cached) |

Staff options: query? — WOL query filter (e.g., 'onsite_status:onsite')

Visitors

| Method | Parameters | Returns | Description | |--------|------------|---------|-------------| | getVisitorEvents | options? | Result<WOLVisitorEvent[]> | Get visitor events (cached) | | getVisitorGroups | - | Result<WOLVisitorGroup[]> | Get visitor groups (cached) |

Visitor event options: signedInAfter? — ISO timestamp filter

Locations

| Method | Parameters | Returns | Description | |--------|------------|---------|-------------| | getLocations | - | Result<WOLLocation[]> | Get all locations (cached) | | getLocation | locationId: number | Result<WOLLocation> | Get single location (cached) |

Cache Management

| Method | Description | |--------|-------------| | clearCache() | Clear all cached data | | invalidateStaffCache() | Invalidate staff data | | invalidateVisitorEventCache() | Invalidate visitor events | | invalidateVisitorGroupCache() | Invalidate visitor groups | | invalidateLocationCache() | Invalidate locations |

License

MIT