2.2.0 • Published 2 years ago
@aautcq/web-utils v2.2.0
@aautcq/web-utils
Utility TS functions.
Basics
Install
$ npm i -D @aautcq/web-utilsUsage
import { formatFullName } from '@aautcq/web-utils';
import type { AnyClass } from '@aautcq/web-utils';Documentation
functions
Colors
| Function name | Arguments | Description |
|---|---|---|
initSavedColors | ||
getSavedColors | ||
saveColor | ||
setColorValue | ||
createAlphaSquare | ||
createLinearGradient | ||
rgb2hex | ||
rgba2hexa | ||
hex2rgb | ||
rgb2rgba | ||
rgb2hsv | ||
hsv2rgb |
Cookies
| Function name | Arguments | Description |
|---|---|---|
setCookie | ||
getCookie | ||
getCookies | ||
deleteCookie |
Dates
| Function name | Arguments | Description |
|---|---|---|
timeAgo | ||
formatDate | ||
formatTime |
Data formating
| Function name | Arguments | Description |
|---|---|---|
upperFirst | ||
capitalizeWordsWithSeparator | ||
capitalizeName | ||
shortenString | ||
stringToScreamingSnakeCase | ||
typeConvertor | ||
cleanObjectFromUndefined | ||
formatFullName | ||
lowerCaseStringIncludes | ||
convertFileUrlToPdf | ||
debounce |
Location
| Function name | Arguments | Description |
|---|---|---|
getQueryParam | ||
setQueryParams | ||
addQueryParams | ||
removeQueryParams | ||
formatQuery |
Phone numbers
| Function name | Arguments | Description |
|---|---|---|
formatPhoneNumber |
Scripts
| Function name | Arguments | Description |
|---|---|---|
appendScript |
Scroll
| Function name | Arguments | Description |
|---|---|---|
scrollTo |
Unique IDs
| Function name | Arguments | Description |
|---|---|---|
getID |