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

@odin-foundation/core

v1.0.4

Published

Official TypeScript implementation of ODIN (Open Data Interchange Notation)

Readme

@odin-foundation/core

npm License

Official TypeScript SDK for ODIN (Open Data Interchange Notation) — a canonical data model for transporting meaning between systems, standards, and AI.

Install

npm install @odin-foundation/core

Quick Start

import { Odin } from '@odin-foundation/core';

const doc = Odin.parse(`
{policy}
number = "PAP-2024-001"
effective = 2024-06-01
premium = #$747.50
active = ?true
`);

console.log(doc.get('policy.number')); // "PAP-2024-001"
console.log(doc.get('policy.premium')); // 747.50

const text = Odin.stringify(doc);

Core API

| Method | Description | Example | |--------|-------------|---------| | Odin.parse(text) | Parse ODIN text into a document | const doc = Odin.parse(src) | | Odin.stringify(doc) | Serialize document to ODIN text | const text = Odin.stringify(doc) | | Odin.canonicalize(doc) | Deterministic bytes for hashing/signatures | const bytes = Odin.canonicalize(doc) | | Odin.validate(doc, schema) | Validate against an ODIN schema | const result = Odin.validate(doc, schema) | | Odin.parseSchema(text) | Parse a schema definition | const schema = Odin.parseSchema(src) | | Odin.diff(a, b) | Structured diff between two documents | const changes = Odin.diff(docA, docB) | | Odin.patch(doc, diff) | Apply a diff to a document | const updated = Odin.patch(doc, changes) | | Odin.parseTransform(text) | Parse a transform specification | const tx = Odin.parseTransform(src) | | Odin.executeTransform(tx, source) | Run a transform on data | const out = Odin.executeTransform(tx, doc) | | doc.toJSON() | Export to JSON | const json = doc.toJSON() | | doc.toXML() | Export to XML | const xml = doc.toXML() | | doc.toCSV() | Export to CSV | const csv = doc.toCSV() | | Odin.stringify(doc) | Export to ODIN | const odin = Odin.stringify(doc) | | Odin.builder() | Fluent document builder | Odin.builder().section('policy')... | | Odin.parseForm(text) | Parse a form definition | const form = Odin.parseForm(src) | | Odin.renderForm(form, data?) | Render form to HTML/CSS | const html = Odin.renderForm(form) |

The SDK also exports parseTransform, executeTransform, parseForm, renderForm, type guards (isOdinString, isOdinNumber, etc.), and all ODIN types.

Schema Validation

import { Odin } from '@odin-foundation/core';

const schema = Odin.parseSchema(`
{policy}
!number : string
!effective : date
!premium : currency
active : boolean
`);

const doc = Odin.parse(source);
const result = Odin.validate(doc, schema);

if (!result.valid) {
  console.error(result.errors);
}

Transforms

import { Odin } from '@odin-foundation/core';

const transform = Odin.parseTransform(`
map policy -> record
  policy.number -> record.id
  policy.premium -> record.amount
`);

const result = Odin.executeTransform(transform, doc);

Forms

import { Odin } from '@odin-foundation/core';

const form = Odin.parseForm(`
{$}
odin = "1.0"
forms = "1.0"
title = "Application"
{$.page}
width = #8.5
height = #11
unit = "inch"
{page[0]}
{.field.name}
type = "text"
label = "Name"
x = #0.5
y = #1
w = #3
h = #0.3
bind = @applicant.name
required = ?true
`);

const html = Odin.renderForm(form);       // accessible HTML/CSS
const filled = Odin.renderForm(form, doc); // with data binding

Export

const odin = Odin.stringify(doc); // ODIN string
const json = doc.toJSON();       // JSON string
const xml = doc.toXML();         // XML string
const csv = doc.toCSV();         // CSV string

Builder

const doc = Odin.builder()
  .section('policy')
  .set('number', 'PAP-2024-001')
  .set('effective', new Date('2024-06-01'))
  .set('premium', { type: 'currency', value: 747.50 })
  .set('active', true)
  .build();

Testing

Tests use Vitest and the shared golden test suite:

npm test

Links