https://github.com/listar/common-fun
common function util
https://github.com/listar/common-fun
Last synced: 9 months ago
JSON representation
common function util
- Host: GitHub
- URL: https://github.com/listar/common-fun
- Owner: listar
- License: mit
- Created: 2020-11-17T07:43:50.000Z (over 5 years ago)
- Default Branch: main
- Last Pushed: 2021-09-29T06:24:16.000Z (over 4 years ago)
- Last Synced: 2025-08-13T03:52:38.879Z (10 months ago)
- Language: JavaScript
- Size: 270 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# 组件说明
类似lodash组件的常用 util包, 有lodash没有的轻量函数
## 推荐使用[lodash](https://www.lodashjs.com/),直接使用lodash更香些
## 公共JavaScript函数
```JavaScript
// import { uuid, unParams, deepCopy, isFunction} from '../../lib/index'
import { uuid, unParams, deepCopy, isFunction } from 'utils-star'
//uuid
console.log(uuid());
//unParams
console.log(unParams(location.search))
//deepCopy
let user = {
ID:1,
nickName: 'star'
}
let newUser = deepCopy(user);
newUser.ID = 2;
console.log(user, newUser);
//isFunction
console.log(isFunction(deepCopy))
```
## todo
+ 准备改名字 util-star
+ 按照功能模块来