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

structom

v0.0.4

Published

efficient data format for all needs

Downloads

422

Readme

structom javascript library

the official package for working with structom for the javascript language

structom

structom (StructuredAtoms) is a lightweight general data exchange format designed for universal applications, from small human readable object files to large scale data serialization.

structom has 3 different forms for data representation:

  • object notation: consize human readable systax for data manipulated by humans.
  • binary objects: effecient direct form for shcemaless data.
  • serialized structs: flattern form for performant data serialization.

structom provide additional rich data structures (tagged unions), supports both schema and schemaless data, and provide support for user defined erased metadata for richer data representation.

structom is designed to be very versatile and expressive, while remaining efficient and performant, adapting for any need from high level rich data notation to low level effecient serialization.

read more about the structom format in its specification.

Value

export interface UUID {
	type: 'uuid',
	value: Uint8Array
};
export interface Dur {
	type: 'dur',
	value: bigint
}
export type Value = 
	boolean | number | string | bigint | Date | UUID | Dur | Array<Value> | Map<Value, Value>;

Value: a structom value, can be:

  • boolean: represent a bool type.
  • number: represent a u8, u16, u32, i8, i16, i32, f32, f64 type.
  • bigint: represent a u64, i64, vuint, vint, bint type.
  • string: represent a string type.
  • Date: represent a inst, instN, type.
  • UUID: represent a uuid type, a 16 byte Uint8Array array.
  • Dur: represent a dur type, a bigint nanosecond value.
  • Array: represent a arr type.
  • Map: represent a map, struct, enum type.

encode / decode

export function encode(value: Value): Uint8Array;
export function decode(data: ArrayBuffer): Value;

encode: encode a given Value into its binary representation.
decode: decode a given binary data into a Value.

this functions expect / insert a header before the encoded data, specifing any type.

codegen support

this package also export a collection of encoding and decoding utilities used by the generated serialization code, not intended to be used directly.