@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()) = "10.10.2026"
formatDateTime(new Date()) = "10.10.2026 14:34"
formatDate(new Date(), 'DD MMMM YYYY') = "10 октября 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() = "jxkbccoq"
generateAlphanumericID(12) = "n9djU9zB09hd"
generateUUID() = "0b05aef2-7d1d-4939-ab35-fc3517e9f7a0"

debounce (see console)