@unanim/helpers
v1.0.6
Published
A library of helpers
Downloads
7
Readme
@unanim/helpers
A library of helper and utility functions
Installation
yarn add @unanim/helpers
Usage
import { capitalize } from '@unanim/helpers'
capitalize('string')
// returns 'String'
Complete List
API
- resolveApiPath
- makePostBody
ARRAY
- dynamicSort
- sortAlphabetically
- toggleItem
- insertItemAtIndex
- insertItemsAtIndexes
- arrayShuffle
- groupBy
- longestLength
BROWSER
- getBrowser
- getNavigatorLanguage
- lockScroll
- unlockScroll
- copyToClipBoard
COLORS
- hexToRgb
- pSBC
COOKIES
- getCookie
- getAllCookies
- createCookie
- deleteCookie
CSS
- getCSSVar
- setCSSVar
DATE
- resolveDateFormat
- formatTimestampToLocaleDate
- formatISOToLocaleDate
- formatDate
- humanDate
- isDatePast
- isDateBefore
- isHourBefore
DOM
- getRect
- getDocumentHeight
- getMousePos
- getPosition
- getSize
- getScrollTop
EVENTS
- addListeners
- removeListeners
- dispatchEvent
NUMBER
- checkValue
- clamp
- formatToEuroNumber
- getDifference
- lerp
- map
- mathRoundTwo
- padWithZeroes
- randomInteger
NUXT
- getStringFromErrors
- getErrorMessage
STRING
- hyphenate
- generateGuid
- truncateString
- capitalize
- snakeToPascal
- stripTags
TIME
- setFrameTimeout
- clearFrameTimeout
- setFrameInterval
- clearFrameInterval
- debounce
- wait
URL
- getUrlParams
- getUrlParamsHashtag
- removeUrlAllParams
- removeUrlParams
- removeUrlAllParamsHashtag
- removeUrlParamsHashtag
- setUrlParams
- setUrlParamsHashtag
- getYoutubeIdFromUrl
- getVimeoIdFromUrl
© Made with love and lots of coffee by Unanim.studio