1.1.6 • Published 7 years ago

timepack-util v1.1.6

Weekly downloads
5
License
MIT
Repository
github
Last release
7 years ago

timepack-util

How to install?

npm install timepack-util

How to Use?

import Util from 'timepack-util'

API List

methodreturndescription
getQueryByName(str)String or Nullget url query-value by query-key
isTelephone(str)Booleanjudge string is telephone or not
dateFormat(date,fmt)Stringformat date
removeArrayItem(array,index)Stringremove item from an array
browser().isIE()Booleanjudge current browser is ie or not
browser().isFirefox()Booleanjudge current browser is firefox or not
browser().isChrome()Booleanjudge current browser is chrome or not
browser().isAndroid()Booleanjudge current browser is android or not
browser().isIOS()Booleanjudge current browser is ios or not
browser().isWeixin()Booleanjudge current browser is wechat or not
string().trim(str)Stringtrim string
string().isEmpty(str)Stringjudge the input string is empty
string().isNotEmpty(str)Stringjudge the input string is not empty
string().isBlank(str)Stringjudge the input string is blank
string().isNotBlank(str)Stringjudge the input string is blank
fileUploader(param,callback)No Returnupload a file to server through qiniu

fileUploader method statement

paramdefaultrequired
fileTypejpg,png,jpegfalse
buttonIdnulltrue
uptokennulltrue
domainhttps://images.cache.timepack.cn/true
size4mbfalse
callbackdescriptionrequired
addedtrigger when files have been addedfalse
progresstrigger when a file were uploadingfalse
completetrigger when a file uploading event completedfalse
uploadedtrigger when a file uploading successfullytrue
errortrigger when a file uploading event came across an errorfalse
1.1.6

7 years ago

1.1.5

7 years ago

1.1.4

7 years ago

1.1.3

7 years ago

1.1.2

7 years ago

1.1.1

7 years ago

1.0.7

7 years ago

1.0.6

7 years ago

1.0.5

7 years ago

1.0.4

7 years ago

1.0.3

7 years ago

1.0.2

7 years ago

1.0.1

7 years ago

1.0.0

7 years ago