Show Menu
Cheatography

haodt-module Cheat Sheet by

Cheat sheet for haodt-module

Document

File

dataUR­­Lt­oFile
(dataurl, filename)
base64 to file
imageT­oBase64
async (file)
image to base64

Format

number­For­matter
(num, digits) - ,[digits]
Format k | M | G | T | P | E
toThou­san­dFilter
(num)
format 400,000
kFormatter
(num)
format 40k

Time

getYears
(from, to, select = false)
getMonths
(from = 1, to = 12, select = false)
getHours
(from = 0, to = 23, select = false)
getMinutes
(step = 5, select = false)
daysIn­­Month
(dateS­tring, subName = true, select = false)
formatDate
(date)
second­ToDay
(second)
parseTime
(time, cFormat)
parse time to format
parseTimeToTzJapan
(date)
roundTimeQuarterHour
(time)
disabledDateElDatePicker
(time)
Function handle disabled past date for datepicker of element ui
 

Validate

checkO­­nl­y­N­umber
(string)
checkN­umb­erO­neA­ndT­woByte
(string)
checkC­har­acterJP
(string)
checkC­har­act­erT­woByte
(string)
checkO­nly­Flo­atN­umber
(string)
isString
(string)
isArray
(argument)
valida­teL­owe­rCase
(string)
valida­teU­ppe­rCase
(string)
valida­teA­lph­abets
(string)
isEmai­lValid
(email)
valida­teO­neByte
(string)
number­OneByte
(string)
validURL
(url)

Vue 2

 
 

Other

scroll­­ToTop
(top = 0)
stripHtml
(html)
remove html tag
conver­­tB­ase64
(val)
convert text to base 64
downlo­adTagA
(url, filename)
matchI­nArray
(string, expres­sions)
have expression in string?
create­Uni­que­String
()
debounce
(func, wait, immediate)
param2Obj
(url)
functionForSortJavascript
ByAttributeAsc
(item1, item2, attribute, sortTy­peASC = true)
function for Array.sort of javascript by attribute asc or desc
getTim­eNowJP
()

Vue 3

SpinnerV3
<Sp­innerV3 :loadi­ng=­"­loa­din­g" />
 

Comments

No comments yet. Add yours below!

Add a Comment

Your Comment

Please enter your name.

    Please enter your email address

      Please enter your Comment.

          Related Cheat Sheets

          Sass Functions Cheat Sheet

          More Cheat Sheets by tronghao

          haodt-lodash Cheat Sheet
          haodt-web-trainning-bt-01 Cheat Sheet
          haodt-web-trainning-calendar Cheat Sheet