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

alt-asset-spec

v1.1.0

Published

An open-source, industrial-strength TypeScript data specification and runtime validation engine for high-value alternative assets.

Readme

alt-asset-spec

An open-source, industrial-strength TypeScript data specification and runtime validation engine for alternative assets graded by third-party services.

License: MIT TypeScript ES Modules


The Philosophy

This specification grew from ongoing work with third party graded comic books and represents a desire to move from ad hoc data structures to something more structured and flexible.

Traditional tracking schemas for alternative assets fail at the high end because they conflate the ephemeral container (the third-party encapsulation shell/serial number) with the immutable underlying physical asset. This schema enforces a strict separation: a physical asset stays uniform via a persistent internal URN, while tracking dynamic real-world events like intra-company regrades, corporate crossovers, reholders, private trades, and asset-for-asset swaps.

Features

  • Strict Type Definitions: Complete TypeScript interfaces modeling asset primitives, currency matrices, and third-party grading certifications (CGC, PSA, WATA, PCGS, etc.).
  • Decoupled Architecture: Core primitives scale across multiple domains (comic, trading_card, video_game, coin) without duplicating schema foundations.
  • Runtime Validation: Native type guards to ensure messy, incoming web-scraped auction data or JSON streams comply with the specification boundaries before hitting your database.
  • Provenance Ledger Engine: Built natively to handle complex asset lifecycles, tracking changes in serialization (previousCertNumbernewCertNumber) alongside financial velocity indices.

Architecture Blueprint

       [ Core AltAssetBase Wrapper ]
                     │
     ┌───────────────┴───────────────┐
     ▼                               ▼
[ currentAuthentication ]    [ historicalAuthentication[] ]
  (Active Cert/Holder)         (Retired Holders/Slabs Ledger)
     │                               │
     └───────────────┬───────────────┘
                     ▼
          [ provenanceLedger[] ]
  (Sales, Asset Swaps, Regrades, Reholders)

Installation

npm install alt-asset-spec

Quick Start

1. Enforcing Type Safety (Compile-Time)

import { AltAssetComic } from 'alt-asset-spec';

const churchSuperman: AltAssetComic = {
  urn: 'urn:altasset:comic:dc:superman:1:edgar-church-copy',
  schemaVersion: '1.0.0',
  assetClass: 'comic',
  currentAuthentication: {
    grader: 'CGC',
    numericGrade: 8.5,
    rawGradeString: '8.5 Very Fine',
    isActive: true
  },
  provenanceLedger: [
    {
      eventId: 'evt_sale_2026',
      eventType: 'private_sale',
      date: '2026-02-05',
      platform: 'Heritage Auctions',
      financials: { amount: 7000000, currency: 'USD' }
    }
  ],
  customMetadata: {
    publisher: 'DC',
    title: 'Superman',
    issueNumber: '1',
    publicationDate: '1939-06'
  }
};

2. Runtime Ingestion Guarding

Validate untrusted JSON data payloads (e.g., streaming from web scrapers or external APIs) before mutating data:

import { isAltAsset, validateProvenanceLedger } from 'alt-asset-spec';

const incomingData = await fetchExternalAuctionPayload();

if (isAltAsset(incomingData)) {
  const ledgerStatus = validateProvenanceLedger(incomingData.provenanceLedger);
  if (!ledgerStatus.isValid) {
    console.error('Ledger errors detected:', ledgerStatus.errors);
  }
}

Development & Contribution

Repository Scripts

  • npm run build - Compiles the source TypeScript, generating ESM distributions and .d.ts declarations to /dist.
  • npm run test - Executes the unit testing suite via Vitest against historical asset benchmarks (including the Church Superman #1).
  • npm run typecheck - Compiles the codebase without emitting artifacts to run strict type checks.
  • npm run release:check - Runs type checks, tests, and build in release order.

Publishing

This repository publishes to npm via GitHub Actions when a GitHub Release is published.

  1. Add an npm automation token as the repository secret NPM_TOKEN.
  2. Create and publish a GitHub Release (for example, from a vX.Y.Z tag).
  3. The Publish to npm workflow installs dependencies, runs npm run release:check, and publishes with npm publish --provenance.

License

Distributed under the MIT License. See LICENSE for more information.