A vibe-coded javascript library for working with CTS and CITE2 URNs

vibe coding
cite
hmt
iiif
new package
Author

Neel Smith

Published

2025-05-23

New package announcement: urn-lib.js

Summary and motivation

urn-lib.js is a javascript library for parsing, validating, comparing, and retrieving data associated with CTS (Canonical Text Services) URNs and CITE2 URNs.

Release notes

Initial release. Main features:

  • analyze and manipulate CTS URNs and CITE2 URNs
  • comparison of CTS URNs and CITE2 URNs based on equality or URN congruence
  • retrieve data from delimited-text sources based on URN congruence

Installation

The file urn-lib.js can be downloaded from github and used locally, or loaded vis jsDelivr from https://cdn.jsdelivr.net/gh/neelsmith/urns-lib/urn-lib.js.

Documentation

Source

Caveats

The javascript library and the markdown documentation were written entirely by gemini-2.5-pro. The code passes a series of sanity tests, but I have not even looked at the javascript. When I encountered errors, I let gemini fix them. Use the code as you like, but be aware that I have no idea what it does or how it works.

Auditing the build:

  • github repository includes a complete transcript of the chat used to generate the script, with saved intermediate versions of the javascript library. See the repository README for details.