This package has been deprecated

Author message:

please don't try to use this package.

js-common-func

0.0.8 • Public • Published

js-common-func(持续更新)

常用 JS 方法集合

npm install js-common-func --save-dev

import Common from 'js-common-func'

date

Common.date.transformTimeStampToTime(timestamp) // 传入时间戳,返回最常见的时间格式字符串(待改进)
Common.date.transformCurrentTimeZoneTimeStamp(dateObj) // 传入时间对象,返回当前时区的时间戳(有 bug)

dom

Common.dom.getStyle(element) // get the element style

num

Common.num.uuid(len, radix) // 生成 uuid,len 为生成的长度,radix 为生成的进制
Common.num.alreadyInArray(arg, arr) // 判断一个元素是否在一个数组里,返回布尔值(待改进),arg 为待判断的数,arr 为已存在的数组

bom

Common.bom.getBrowserInfo() // get the browser information

Readme

Keywords

Package Sidebar

Install

npm i js-common-func

Weekly Downloads

0

Version

0.0.8

License

ISC

Last publish

Collaborators

  • kaijunhe