max-utils
v1.0.16
Published
Javascript Utils
Downloads
12
Readme
max-utils
Javascript Utils
Build
yarn build
Test
yarn test
Istanbul coverage
yarn istanbul
Try in Runkit
Case
Type
- type
type(data)
Time
- parseTime
parseTime(time, '{y}-{m}-{d} {h}:{i}:{s}')
Data
- deepClone
deepClone(data);
Number
- round
round(number, decimals);
- random
random(digit);
- sum
sum(number1, number2, number3, ...);
- numberAddDot
numberAddDot(number, ',');
Html
- copyText
copyText(text, callback);
- download
download(link, name);
Cookie
- setCookie
setCookie(key, value, maxAge);
- getCookie
getCookie(key);
- deleteCookie
deleteCookie(key);
Browser
- queryString
queryString(name);
- queryStringObj
queryStringObj();
Others
- debounce
debounce(function, delay);
- throttle
throttle(function, delay);