stnd.build

@stnd/utils

Circle 3 — Specialized Satellite & Plumbing · Active · Utility

Role: Shared isomorphic TypeScript/JavaScript helpers (slugify, date formatting, profile schemas, deep merge).

When to use: Reuse common pure functions across server models and client scripts (Law #2: DRY).

Quick Start (TL;DR)

import { slugify } from "@stnd/utils";

Pure utility functions for the Standard Ecosystem.


ELI5

The odds-and-ends drawer: slugify a title, count reading time, merge two config objects deeply, validate a filename. No framework, no side effects, zero dependencies — safe to import anywhere (Node, browser, Cloudflare Worker) without dragging anything else in.

import { slugify, formatDate } from "@stnd/utils";
slugify("Hello World!"); // "hello-world"
formatDate(new Date(), "dot"); // "24.03.14" — YY.MM.DD, two-digit year

Overview

@stnd/utils provides a collection of small, focused utility functions with zero dependencies. These functions are designed to be “pure” — they have no side effects and do not depend on any specific framework or environment (isomorphic).

Key Modules

String & Content (/utils.js)

Filenames & IDs (/filename.js)

CSS Sanitization (/css.js)

Date & Time (/utils.js)

Data & Logic (/utils.js)

Usage

import { slugify, formatDate } from "@stnd/utils";

const title = "Hello World!";
const slug = slugify(title); // "hello-world"

const today = formatDate(new Date(), "dot"); // "24.03.14" (YY.MM.DD)

Features