@qor/helpers Playground

Formatting

formatCurrency

formatCurrency(1000) = "1 000 ₸"
formatCurrency(1234.56) = "1 235 ₸"
formatCurrency(null) = ""

formatPhone

formatPhone('+77001234567') = "+7 700 123 45 67"
formatPhone(77001234567) = "+7 700 123 45 67"
formatPhoneParens('77001234567') = "+7 (700) 123-45-67"

formatDate

formatDate(new Date()) = "11.08.2026"
formatDateTime(new Date()) = "11.08.2026 06:54"
formatDate(new Date(), 'DD MMMM YYYY') = "11 августа 2026"

formatName

formatName('Иван', 'Иванов') = "Иван Иванов"
formatNameShort('Иван', 'Иванов', 'Иванович') = "Иван И. И."
getInitials('Иван', 'Иванов') = "ИИ"

Data Transformation

toQueryParams

toQueryParams({ page: 1, search: 'test' }).toString() = "page=1&search=test"

getNestedValue

getNestedValue({ a: { b: { c: 'deep' } } }, ['a', 'b', 'c']) = "deep"

Utilities

generateRandomID

generateRandomID() = "mjpzeadc"
generateAlphanumericID(12) = "6X2MJNQ8abuv"
generateUUID() = "f1497f7d-b0fe-4afd-8b31-31f40f12997a"

debounce (see console)