JSPM

  • Created
  • Published
  • Downloads 6
  • Score
    100M100P100Q46061F
  • License ISC

项目常用函数库

Package Exports

  • ulia

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (ulia) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

项目常用函数库

名 称:prefixStyle

功 能:使用js追加适配当前浏览器DOM对象样式属性前缀
 import { prefixStyle } from 'ulia'
 const animation = prefixStyle('animation')
 eleObject.style[animation]   = 'Ani 6s infinite'
 eleObject.style['animation'] = 'Ani 6s infinite'
备 注:在浏览器控制台里键入如下代码,查看当前浏览器前缀情况:
 document.createElement('div').style
单独引用
 import prefixStyle from 'ulia/lib/dom/style/prefixStyle'

名 称:isSupportWebP

功 能:判断当前浏览器是否支持WebP图片格式
 import { isSupportWebP } from 'ulia'
单独引用
 import isSupportWebP from 'ulia/lib/boolean/isSupportWebP'

名 称:zerofill

功 能:位数不足,前缀补零,默认两位数,第二个参数表示保留位数,非法参数一律返回首参数
 import { zerofill } from 'ulia'
 zerofill(9) // '09'
 zerofill(66,3) // '066'
  ...
单独引用
 import zerofill from 'ulia/lib/number/zerofill'

名 称:quickSort

功 能:一维数字数组快速排序, 非一维数字数组一律返回空数组
 import { quickSort } from 'ulia'
单独引用
 import quickSort from 'ulia/lib/array/quickSort'

名 称:quickUnique

功 能:一维基本类型数据数组快速去重
 import { quickUnique } from 'ulia'
单独引用
 import quickUnique from 'ulia/lib/array/quickUnique'

名 称:parseQueryString

功 能:序列化对象url链接get参数 // 类似JSON.parse()
 import { parseQueryString } from 'ulia'
单独引用
 import parseQueryString from 'ulia/lib/string/parseQueryString'

名 称:stringfyQueryString

功 能:序反序列化满足get参数要求 // 类似JSON.stringfy()
 import { stringfyQueryString } from 'ulia'
单独引用
 import stringfyQueryString from 'ulia/lib/string/stringfyQueryString'

名 称:scrollToTop

功 能:返回顶部
 import { scrollToTop } from 'ulia'
单独引用
 import scrollToTop from 'ulia/lib/function/scrollToTop'