Status
Small, opaque identity and candidate-word primitives for Fungi packages
Stability
Section titled “Stability”Cairn declares source version 0.1.0. Until 1.0, a minor release can change the public API, so pin the version you test against.
Package qualification does not publish a release. Check the npm registry before choosing a released version.
Limits and errors
Section titled “Limits and errors”ID generation needs secure randomness. If that source is unavailable, Cairn
throws CairnGenerationError with the validated family and kind. Invalid
trusted family declarations throw CairnDefinitionError. The caller must use
the codec’s schema at an untrusted wire boundary before passing data to parse.
The root nanoid(length) export is retained for callers that need a raw random
string. Its finite length coercion follows the selected upstream runtime
implementation. Use a bounded nonnegative integer for predictable results.
LONG is a conventional size, not a maximum. Likewise, words({ count }) keeps
legacy count coercion and does not impose a maximum. CPU and output grow with
the requested size, so validate and bound untrusted sizing values before calling
either helper. Use defineIdFamily for durable domain IDs.
Contribute and license
Section titled “Contribute and license”Cairn’s license is MIT. See LICENSE. Its direct runtime
dependencies are nanoid, Zod, and uuid. Consult their package distributions
for their license terms.