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

@stele-climbing/stele1-datatypes

v0.0.2

Published

core datatypes for stele1 catalogs

Readme

@stele-climbing/stele1-datatypes

Core datatypes for stele1 catalogs.

Covers Metadata, Climb, Area, Photo, Parking, and Trail. See the stele1 spec for the data model these implement.

Each datatype validates its input and exposes fromData / toData for serialization to and from plain JSON. Invalid input throws.

This package is ESM-only.

Use

import { Climb } from '@stele-climbing/stele1-datatypes';

// from existing data
const climb = Climb.fromData({
  uuid: '550e8400-e29b-41d4-a716-446655440000',
  name: 'The Mandala',
  rating: { difficulty: 'V12' },
});

// or built up directly
const other = new Climb('123e4567-e89b-42d3-a456-426614174000')
  .setName('Evilution')
  .setRating({ difficulty: 'V12' });

climb.getName();          // 'The Mandala'
climb.setName('The Mandala Direct');
climb.dropRating();       // remove an attribute

climb.toData();           // plain JS object, ready for JSON.stringify

toData returns fresh plain objects; JSON.stringify(climb.toData()) produces spec-compliant output. Formatting is up to the caller.

Getters return the record's internal values, not copies.

Attribute validators

Each datatype module also exports its attribute validators, usable on their own via subpath imports:

import { assertRating } from '@stele-climbing/stele1-datatypes/climb';

assertRating({ difficulty: 'V12' });   // returns the validated value
assertRating({});                      // throws

Catalog adapter

For use with @stele-climbing/stele1-filesystem, this package ships a ready-made adapter:

import { Catalog } from '@stele-climbing/stele1-filesystem';
import { adapter } from '@stele-climbing/stele1-datatypes/adapter';

const catalog = new Catalog('/path/to/catalog', adapter);

catalog.getClimb(uuid);   // a validated Climb instance
catalog.setClimb(climb);  // serialized via toData

Records are validated on read; a file that fails validation throws (or is skipped by each*). Output is written with sorted keys and stable indentation, matching the plain adapter's formatting, so a catalog diffs cleanly regardless of which adapter wrote it.

Compatibility behavior

Per the spec's versioning rules: unknown top-level attributes are preserved verbatim through fromData / toData, and unknown nested keys throw.

Install

npm install @stele-climbing/stele1-datatypes

Development

Source and issues live at codeberg.org/stele-climbing/stele1.

License

MIT