Small, shared utility functions used across Voxgig front-end and back-end code. The library ships in two languages with matching behaviour:
- TypeScript — npm package
@voxgig/util - Go — module
github.com/voxgig/util/go
TypeScript is the canonical implementation; the Go package is kept in parity with it.
TypeScript / Node:
npm install @voxgig/utilpino, pino-pretty, and shape are peer dependencies — install them in the
host project.
Go:
go get github.com/voxgig/util/goTypeScript:
import { camelify, get, pinify } from '@voxgig/util'
camelify('foo-bar') // 'FooBar'
get({ a: { b: 1 } }, 'a.b') // 1
pinify(['user', 'alice', 'role']) // 'user:alice,role:'Go:
import util "github.com/voxgig/util/go"
util.Camelify("foo-bar") // "FooBar"
util.Get(map[string]any{"a": map[string]any{"b": 1}}, "a.b") // 1
util.Pinify([]string{"user", "alice", "role"}) // "user:alice,role:"The documentation is organised into four sections, each answering a different question:
| If you want to… | Read |
|---|---|
| learn the library by doing | Getting started |
| accomplish a specific task | How-to guides |
| look up a function's exact behaviour | TypeScript API · Go API |
| understand why it works the way it does | How it works |
Start at the documentation index for an overview.
Repository conventions and a complete, scannable API quick-reference for AI coding agents live in AGENTS.md.
This repo contains both implementations, side by side in ts/ and go/.
TypeScript output in ts/dist/ and ts/dist-test/ is committed, so rebuild
after changing ts/src/ or ts/test/.
# TypeScript (from ts/)
npm install
npm run build # tsc --build src test -> dist/ and dist-test/
npm test
# Go (from go/)
go test ./...Continuous-integration workflow definitions live in
.github/workflows/.
MIT © Voxgig Ltd. See LICENSE.