Shared utility helpers for Trebired packages and applications.
This package owns small reusable normalization, env, filesystem, package metadata, product identity, version compatibility, hashing, formatting, time, and plain-object helpers. Callers own domain-specific data models, validation policy, persistence, and application behavior.
Runtime support: Bun 1+.
bun i @trebired/utilsimport {
readEnvFile,
readProductIdentity,
toTrimmedString,
} from "@trebired/utils";
const env = readEnvFile(".env");
const product = readProductIdentity();
const name = toTrimmedString(env.NAME, product.name);The package exposes its public helpers from the root import. It does not publish utility subpaths.
Package config loaders use the version helpers to require matching major and minor versions while allowing patch drift when the package chooses that policy.
Filesystem, env, package-json, and product identity helpers are Node/Bun runtime helpers. Pure value helpers remain browser-safe through the root browser condition.
The root export includes pure value helpers, env helpers, filesystem helpers, hashing helpers, package metadata helpers, product identity helpers, result metadata helpers, time helpers, and version compatibility helpers.
This package does not:
- Own domain validation or persistence.
- Replace package-specific config loaders.
- Provide application-specific product metadata.
- Expose utility subpaths as public API.