How to use the @better-scroll/shared-utils.isPlainObject function in @better-scroll/shared-utils

To help you get started, we’ve selected a few @better-scroll/shared-utils examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github ustbhuangyi / better-scroll / packages / wheel / src / index.ts View on Github external
private normalizeOptions() {
    const options = (this.options = isPlainObject(this.options)
      ? this.options
      : {})
    if (!options.wheelWrapperClass) {
      options.wheelWrapperClass = 'wheel-scroll'
    }
    if (!options.wheelItemClass) {
      options.wheelItemClass = 'wheel-item'
    }
    if (!options.rotate) {
      options.rotate = 25
    }
    if (!options.adjustTime) {
      options.adjustTime = 400
    }
    if (!options.wheelDisabledItemClass) {
      options.wheelDisabledItemClass = 'wheel-disabled-item'