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

exposalud-data

v0.1.3

Published

ExpoSalud health fair SDK — compact guest data encoding and health metrics

Readme

exposalud-data

Compact guest data encoding for ExpoSalud health fair events. Encodes a full guest profile into ~133 bytes (vs ~600+ bytes JSON). QR code compatible.

Install

npm install exposalud-data

Protocol — Encode/Decode Guest Data

const { encode, decode, toBase64, fromBase64 } = require('exposalud-data/protocol')

// Encode a guest profile to binary
const buf = encode({
  code: 'FE689B8A',
  name: 'John Doe',
  age: 38,
  sex: 'M',
  height: 175,
  weight: 80,
  bmi: 26.12,
  bmiCat: 'overweight',
  glucose: 95,
  sbp: 120,
  dbp: 80,
  habits: { breakfast: 1, snacks: 0.5, exercise: 1 /* ... */ },
  survey: {
    discovery: ['social'],
    interests: ['nutrition', 'healthy-food'],
    needs: ['health'],
  },
  // ... all other fields
})

console.log(buf.length) // ~133 bytes

// Decode back to object
const guest = decode(buf)
console.log(guest.name) // 'John Doe'
console.log(guest.bmi)  // 26.12

// For QR codes — convert to/from base64
const qr = toBase64(buf)   // 180 chars, fits QR v10
const restored = decode(fromBase64(qr))

Schema Versioning

The protocol is version-aware. Adding new fields is safe:

  1. Add the field to FIXED_FIELDS or STRING_FIELDS at the end
  2. Bump SCHEMA_VERSION
  3. Add the new count to VERSION_FIELD_COUNTS

Old decoders skip unknown fields. New decoders fill defaults for missing fields.

// Example: adding a 'bloodType' field in v2

// In FIXED_FIELDS, append:
['bloodType', cenc.uint8, or0, identity],

// Bump version:
const SCHEMA_VERSION = 2

// Update counts:
const VERSION_FIELD_COUNTS = {
  1: { fixed: 32, strings: 6 },
  2: { fixed: 33, strings: 6 },  // one more fixed field
}

Size Comparison

| Format | Typical Guest | 1000 Guests | |--------|--------------|-------------| | JSON | ~600 bytes | ~600 KB | | Protocol | ~133 bytes | ~133 KB | | Reduction | 78% | 78% |

QR Code Compatibility

| Guest Type | Binary | Base64 | QR Version | |-----------|--------|--------|------------| | Empty | 53 bytes | 72 chars | v3 | | Typical | 133 bytes | 180 chars | v10 | | Long strings | 373 bytes | 500 chars | v20 |

All fit within standard QR code capacity.

Performance

1000 guests: 5ms encode, 5ms decode (Node.js)

License

MIT