JSPM

shake-observer

0.1.0
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 2
  • Score
    100M100P100Q17026F
  • License MIT

基于devicemotion事件,提供监听设备摇动的能力

Package Exports

  • shake-observer

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (shake-observer) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

ShakeObserver

基于devicemotion事件,提供监听设备摇动的能力

安装

$ npm install shake-observer

使用

import ShakeObserver from 'shake-observer'

const observer = new ShakeObserver(e => {
  // do something
})

// 取消监听
observer.disconnect()