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()