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

@digitum/well-known

v1.0.4

Published

Fetch openid well-known information

Readme

Well-known

Module to fetch .well-known/openid-configuration information from a server. It turns out that there are a couple of variants out there, and this library tries to normalize them. Also, built in cache handling will minimize delays and number of calls for this information.

Install

npm install @digitum/well-known

Status: Experimental

Note that this module is highly experimental and should only be used for development and evaluation.

Usage

Constructor

  • hostBase <string> Server address including protocol.
  • options <object>
    • cache <string> | <number> Default: 12h. Number as milliseconds. Accepts time syntax according to npm packet ms.
    • useExpiredCacheData <boolean> Default: true. If set, expired cache will still be used until cache is updated.

Examples

Then/Catch

const WellKnown = require('@digitum/well-known')

let options = {
    cache: '12h'.
    useExpiredCacheData: true.
}

wellKnown = new WellKnown('https://myauthserver.url', options)

wellKnown.get().then(
    (data) => {
        console.log(data)
    }
).catch((err) => {
    console.warn(err)
})

Async/Await

import WellKnown from '@digitum/well-known'

wellKnown = new WellKnown('https://myauthserver.url', options)

let options = {
    cache: '12h'.
    useExpiredCacheData: true.
}

try {
    let data = await wellKnown.get()
} catch (err) {
    console.warn('Something wrong happened')
}

Tests

npm run test

Changelog

1.0.3 (2020-09-06)

  • Switch to typescript (removed malicious dependency)
  • Fix error handling on unreachable servers
  • Added test for Jest framework
  • Added automatic build pipeline

1.0.2 (2018-10-07)

  • Add Github repo
  • Method jwks() added

1.0.1 (2018-10-04)

  • Define target server in constructor
  • Method get() added
  • Static method get() added

1.0.0 (2018-10-03)

  • Initial release, no functions

Known issues

  • Nothing right now.

Licensing

This script is free for use for everyone. Content and functionality can be changed without notice. Breaking changes should indicate by bump major version. This script is published to encourage free software development. Please visit development page for more info. No warranty what so ever. Use it on own risk. It is highly encouraged to use automated tests to ensure that your use cases works as expected. Use Mocha, Jest or any other suitable test framework.

Contact

Dont hesitate to contact me for improvments and suggestions

Contact data will soon be published to my home page.