@gg-software/utils
Pure, framework-agnostic helpers — no React. All formatting helpers use the platform’s
Intl APIs (zero locale data shipped); the few browser-only helpers are SSR-safe no-ops.
pnpm add @gg-software/utilsimport { slugify, formatCurrency, groupBy, debounce } from '@gg-software/utils';| Group | Functions |
|---|---|
| String | capitalize, truncate, slugify, camelCase, kebabCase, snakeCase, titleCase, pluralize, maskString, randomString |
| Number | numberToString, formatNumber, formatCurrency, formatPercent, formatBytes, clamp, round |
| Date | formatDate, formatDateRange, formatRelativeTime, parseDate, addDays, addMonths, isToday, isSameDay |
| Array | groupBy, sortBy, uniqueBy, chunk, partition, range, sum, average, move |
| Object | pick, omit, get, set, deepMerge, deepClone, isEmpty |
| Validation | isEmail, isUrl, isPhone, isStrongPassword |
| Async | debounce, throttle, sleep, retry, memoize |
| Id | uuid, generateId |
| Misc | cx, copyToClipboard, downloadFile, parseQueryString, buildUrl, noop |