dcd-utils

0.0.4 • Public • Published

dcd-utils

Some common functions which are used frequently in development.

1. uuid 方法,创建一个随机uuid。

2. getLeft

- 参数: (dom对象)
- 返回值: 该dom对象的距离屏幕左侧的距离

3. getTop

- 参数: (dom对象)
- 返回值: 该dom对象的距离屏幕顶侧的距离

4. textCountRange

- 参数: string
- 返回值: 该字符串的长度,中文字符换算成两个英文字符

Readme

Keywords

Package Sidebar

Install

npm i dcd-utils

Weekly Downloads

2

Version

0.0.4

License

ISC

Unpacked Size

2.31 kB

Total Files

7

Last publish

Collaborators

  • dcd