# js-common-func

> a javascript library that contains some common functions

Latest version **0.0.8** (published 2017-08-21) · ISC license · 0 weekly downloads

> **Deprecated.** This package is deprecated.

## Install

```sh
npm install js-common-func
pnpm add js-common-func
yarn add js-common-func
bun add js-common-func
```

## Health

**Score 10/100 (F)** — status: deprecated.

Negative: deprecated.

## Facts

| | |
|---|---|
| Version | 0.0.8 |
| Published | 2017-08-21 |
| First published | 2017-07-06 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 2 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | kaijunhe |
| Maintainers | kaijunhe |
| Keywords | functions, javascript |

## Links

- npm: https://www.npmjs.com/package/js-common-func
- Repository: https://github.com/elowes/js-common-func
- Homepage: https://github.com/elowes/js-common-func#readme
- Issues: https://github.com/elowes/js-common-func/issues
- npm.io page: https://npm.io/package/js-common-func

## Dependencies (2)

- [babel-preset-es2015](https://npm.io/package/babel-preset-es2015.md) ^6.24.1
- [babel-preset-stage-0](https://npm.io/package/babel-preset-stage-0.md) ^6.24.1

## Recent versions

- 0.0.8 (latest) — 2017-08-21
- 0.0.7 — 2017-08-18
- 0.0.6 — 2017-08-14
- 0.0.5 — 2017-08-04
- 0.0.4 — 2017-07-30
- 0.0.3 — 2017-07-18
- 0.0.2 — 2017-07-06
- 0.0.1 — 2017-07-06

## README

# 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
```

---
_Source: https://npm.io/package/js-common-func · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
