Skip to content

Regira Utilities (front-end)

@regira/modules/utilities — a framework-agnostic helper library exposed as twelve namespaced barrels (arrays, strings, files, dates, colors, DOM, HTTP/URLs, images, numbers, objects, promises, clipboard). No Vue dependency; used throughout the app and by the entities client.

What it provides

ExportPurpose
arrayUtilityLINQ-like iterable helpers: orderBy, groupBy, distinct, innerJoin, page, sum, toMap, query, …
stringUtilityCompare/trim/case-convert, validators (isEmail/isUrl/…), slugify, newGuid, normalizeDiacritics.
fileUtilityBlob/File/base64/url conversions, toFormData, saveAs, formatFileSize (+ browse/dropHandler).
datetimeUtilityisValidDate, stringifyDate (timezone-preserving), timer, countDown.
httpUtilitytoQueryString, getQueryStringParams, getHttpsUrl/forceHttps, isLocalHost.
colorUtilityHex ⇄ rgb conversions, invertHex, grayscale.
imageUtilityHTMLImageElement/canvas/blob conversions, resize, rotate, convertType, white2transparent.
numberUtilitygetRandom, naturalCompare.
objectUtilityisPlainObject, flattenObject, crawlObject, mixin, filterObject.
promiseUtilitydelay, enqueue, debounceToPromise.
htmlUtilityredirect, setMetaTag, setCanonicalTag.
clipboardUtilityThe copy function itself — clipboardUtility(text) (clipboard API with execCommand fallback).

array-utility, file-utility, string-utility, and promise-utility also have granular subpaths (e.g. @regira/modules/utilities/array-utility); the array/file/string subpaths' named exports include a few functions the barrel object omits (e.g. browse/dropHandler, newPassword) — see the reference. object-utility has no subpath, so its source-only named exports deepCopy and removeEmpty are internal: they are not reachable from the published package.