@youtap/ytti
v2.8.1
Published
## Installation with NPM
Downloads
131
Keywords
Readme
Installation and Usage
Installation with NPM
Install with NPM
npm i @youtap/yttiUsage
Auth
import {
decodeAndDecompressCookie,
setCookie,
unsetCookie,
getUserToken,
getUserTokenWithDecodeAndDecompress,
getUserProfile,
isLoginServer,
isLogin
} from "@youtap/ytti/modules/auth"
const tokenName = example
const tokenPayload = { name: example }
setCookie(tokenName, tokenPayload)Formater
import {
getToday,
formatDate,
formatDateString,
formatDateYear,
formatDateYearString,
formatDateDash,
formatDateStringDash,
formatDateYearDash,
formatDateYearStringDash
...
} from "@youtap/ytti/modules/formater"
formatDate(date) // DD/MM/YYYY
formatDateString(date) // DD/MMM/YYYY
formatDateYear(date) // YYYY/MM/DD
formatDateYearString(date) // YYYY/MMM/DD
formatDateDash(date) // DD-MM-YYYY
formatDateStringDash // DD-MMM-YYYY
formatDateYearDash(date) // YYYY-MM-DD
formatDateYearStringDash(date) // YYYY-MMM-DDHelper
import {
randomNumber,
randomAlphaNumeric
...
} from "@youtap/ytti/modules/helper"
randomNumber(length) // 321123
randomAlphaNumeric(length) // 123qwe321Lib
import {
resizeImage
...
} from "@youtap/ytti/modules/lib"
resizeImage({
file: file,
filename: filename,
maxSize: 10
})
