Skip to main content

Welcome to Open Kerno Commons

· One min read
Open Kerno Team
Maintainers

We are happy to introduce @open-kerno/commons — a shared TypeScript utility library for Node.js services.

What is it?

@open-kerno/commons is a collection of well-tested, typed modules designed to solve common problems across backend services. Instead of copying the same utilities from project to project, you can install this package and start using them right away.

What is included?

  • HTTPHttpStatusCode and HttpMethod enums covering all standard codes and methods.
  • Errors — Typed error classes (ServerError, BadRequestError, InternalServerError, DatabaseConnectionError) with HTTP status codes and optional error payloads.
  • CollectionscreateMapFromArray and createSetFromArray for fast lookups.
  • Mathprorate for proportional distribution and roundWithPrecision for accurate rounding.
  • Logger — A structured logger with field masking, built on Winston.
  • Infrastructure — A PostgreSQL connection pool wrapper with session and transaction helpers.
  • ObjectencodeJSON for safe JSON parsing with typed fallbacks.

Getting started

npm install @open-kerno/commons

Check the documentation for the full API reference.