wg-util 前端的util库 使用 npm i wg-util average average([]number) date dateFormat (date: Date, fmt: string) dom addClass(el: HTMLElement, cls: string) removeClass(el: HTMLElement, cls: string) function hasClass(el: HTMLElement, cls: string) objects typeOf(obj: any) strings randomStr(len=32) other encodeParam(param) loadScript(src: string) preloadScript (src: string) npm run test -t throttle