1.3.0 • Published 5 years ago

sd-browser-common v1.3.0

Weekly downloads
1
License
ISC
Repository
-
Last release
5 years ago

common

公共方法库

Usage

const Common = require('sd-browser-common');

// 获取对象值
const obj = {
    'a': [{
      'b': {
        'c': 3
      }
    }]
  }
Common.get(obj, 'a[0].b.c') // 3
Common.get(obj, ['a', '0', 'b', 'c']) // 3
Common.get(obj, 'a.b.c', 'default') // 'default'
Common.get(obj, 'a.c') // undefined

支持的API

名称描述
get获取对象值
cloneDeep深拷贝
throttle节流
debounce防抖
parseQueryStringurl参数转对象
1.3.0

5 years ago

1.2.0

5 years ago

1.1.0

5 years ago