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

soms

v0.1.12

Published

Simple, Opinionated Message Schema

Readme

soms

Simple, Opinionated Message Schema

Types

  • boolean
  • int64
  • double
  • string
  • user-defined type (UDT)
  • Array<boolean | int64 | double | string | UDT>

All types are nullable except Arrays, which may be zero-length.

Constants

  • name : string
    • Description: the name of the constant.
  • type : boolean | int64 | double | string | UDT | Array<boolean | int64 | double | string | UDT>
    • Description: the type of the constant.
  • value: string
    • Description: the serialized form of the value of the constant.

In principle these will be treated as closely as the target language allows to the platonic ideal of static const in the context of whichever containing structures they appear in.

Fields

  • name : string
    • Description: the name of the field.
  • type : "boolean" | "int64" | "double" | "string" | <UDT-name> | "Array<" <boolean | int64 | double | string | UDT> ">"
    • Description: the type of the field.
  • (optional) position : int64
    • Description: the zero-indexed position of the field in its containing structure.
    • Default value: the order in which the field is declared within its containing structure in the AST.
  • (optional) optional : boolean
    • Description: whether the field may be absent in serialized form. Optional fields are implicitly assumed to be present and default-valued. Deserialization must not require optional fields, but serialization must output them. The point of this is to balance ease of hand-writing objects with simplicity of serde implementation.
    • Default value: false
  • (optional) default-value : boolean | int64 | double | string | UDT | Array<boolean | int64 | double | string | UDT>
    • Description: the default value to use for implicitly specified values.
    • Default value: null for boolean | int64 | double | string | UDT, zero-length Array for Array types.

User-Defined Types (UDTs)

  • name : string
    • Description: the name of the UDT (i.e., the class name).
  • (optional) constants : Array<Constant>
    • Description: whatever static const things you want in the UDT.
    • Default value: zero-length Array<Constant>.
  • (optional) fields : Array<Field>
    • Description: whatever fields you want in the UDT.
    • Default value: zero-length Array<Field>.

Packages

  • name : string
    • Description: the name of the package (or module, or namespace, or whatever makes most sense in the target language).
  • (optional) constants : Array<Constant>
    • Description: whatever static const things you want in the package.
    • Default value: zero-length Array<Constant>.
  • (optional) udts : Array<UDT>
    • Description: whatever UDTs you want in the package.
    • Default value: zero-length Array<UDT>