1.1.2 • Published 4 years ago

@qqfavcom/common-utils v1.1.2

Weekly downloads
1
License
ISC
Repository
github
Last release
4 years ago

组件说明

类似lodash组件的常用 util包
组件好像没什么存在的用处

推荐使用lodash,直接使用lodash更香些

公共JavaScript函数

// import { uuid, unParams, deepCopy, isFunction} from '../../lib/index'

import { uuid, unParams, deepCopy, isFunction } from '@qqfavcom/common-utils/lib/index'

//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

  • 可以抄 lodash
  • 准备改名字 util-star
  • 按照功能模块来
1.1.2

4 years ago

1.1.1

4 years ago

1.1.0

4 years ago

1.0.4

4 years ago

1.0.3

4 years ago

1.0.2

5 years ago

1.0.0

5 years ago