Skip to content

Utils

A collection of 47+ small, focused, tree-shakeable utilities for dates, colors, math, DOM operations and more. Built with TypeScript-first APIs and Luxon for date handling.

Categories

Reference

  • ConstantsCHECK, CROSS, MDASH, NDASH, NOOP
  • TypesConstructor, Descriptors plus the domain enums returned by the date helpers

Quick example

ts
import { formatDate, hexToRGB, mulberry32 } from '@basmilius/utils';
import { DateTime } from 'luxon';

formatDate(DateTime.now()); // localized date string
hexToRGB('#0070f3');         // [0, 112, 243]
const random = mulberry32(42); // seeded PRNG
random.next();                  // deterministic 0..1 value

Continue with installation or pick a category above.