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

@myrmidon/cadmus-refs-viaf-lookup

v10.0.5

Published

Cadmus - VIAF lookup.

Readme

CadmusRefsViafLookup

📦 @myrmidon/cadmus-refs-viaf-lookup

This project was generated using Angular CLI version 20.0.0.

This is preliminary work. This should wrap VIAF for quick lookup.

⚠️ Updated Configuration Required: This service now uses the modern VIAF API endpoints with standard HTTP requests instead of JSONP. You need to configure your Angular application to use the Fetch API:

// in your app.config.ts
import { provideHttpClient, withFetch } from "@angular/common/http";

export const appConfig: ApplicationConfig = {
  providers: [
    // other providers...
    provideHttpClient(withFetch()),
    // ...
  ],
};

⚠️ Also, if using this service in JWT-enabled apps with an interceptor which injects the Bearer token, you must exclude the VIAF URI from the intercepted requests, or you will get a generic CORS error. To configure exclusions:

 // in your app.config.ts or a feature module:
 providers: [
   {
     provide: AUTH_JWT_EXCLUDED_URLS,
     useValue: [
       'https://viaf.org/viaf/',
     ]
   }
 ]

API Endpoints Used

  • AutoSuggest: https://viaf.org/viaf/AutoSuggest - Returns JSON data for typeahead suggestions
  • Search: https://viaf.org/viaf/search - Returns XML data for detailed queries (with JSON parsing)

Breaking Changes from Previous Version

  • REMOVED: JSONP support requirement (withJsonpSupport() no longer needed)
  • ADDED: Fetch API requirement (withFetch() now required)
  • UPDATED: Uses modern HTTP requests with proper Accept headers
  • IMPROVED: Better error handling and response parsing

Migration Guide

If you're upgrading from a previous version:

  1. Remove JSONP configuration:

    // OLD - Remove this
    provideHttpClient(withJsonpSupport());
  2. Add Fetch API configuration:

    // NEW - Add this
    provideHttpClient(withFetch());
  3. Update imports (if using non-standalone approach):

    // OLD - Remove HttpClientJsonpModule
    imports: [HttpClientModule, HttpClientJsonpModule];
    
    // NEW - Only HttpClientModule needed
    imports: [HttpClientModule];

To override the API root URI, do like this in your app:

// app.config.ts
import { VIAF_API_BASE_TOKEN } from '@myrmidon/cadmus-refs-viaf-lookup';

export const appConfig: ApplicationConfig = {
  providers: [
    // ...other providers...
    // optional: override the default VIAF API base URL
    {
      provide: VIAF_API_BASE_TOKEN,
      useValue: 'https://my-proxy.example.com/viaf'
    },
};

History

  • 2025-07-24: added VIAF_API_BASE_TOKEN to allow overriding the API root URI.
  • 2025-07-15: ⚠️ totally rewritten VIAF service to use the new API endpoints.
    • BREAKING: Replaced JSONP with standard HTTP + Fetch API
    • Updated: Now uses https://viaf.org/viaf/AutoSuggest for suggestions
    • Fixed: Proper JSON response handling with Accept headers
    • Note: VIAF API documentation at https://developer.api.oclc.org/viaf-api appears outdated; implementation based on actual endpoint testing