shake-monitor
Advanced tools
Comparing version 0.2.5 to 0.2.6
@@ -6,1 +6,2 @@ 'use strict';function isEmptyObject(a){return 0===Object.keys(a).length}function getDelta(a,b){return Math.abs(a-b)}function isFunc(a){return"function"===typeof a}function isDeviceMotionSupported(){return"DeviceMotionEvent"in window}function isListenerRequirePermission(){return isFunc(DeviceMotionEvent.requestPermission)} | ||
e.push(a);return this},unsubscribe:function(a){isFunc(a)&&(e=e.filter(b=>b!==a));return this},start:function(){g||(g=!0,k.start(),h=performance.now(),f={});return this},stop:b,requestPermission:function(a){return n?Promise.resolve(!0):k.requestPermission(a).then(a=>{n=a;return Promise.resolve(a)})}}}function isShake(a,b,d,c){return a>c&&b>c||a>c&&d>c||b>c&&d>c}module.exports=createShakeMonitor | ||
//# sourceMappingURL=shake-monitor.cjs.js.map |
@@ -6,1 +6,2 @@ function m(b){return"function"===typeof b} | ||
c.push(a);return this},unsubscribe:function(a){m(a)&&(c=c.filter(b=>b!==a));return this},start:function(){g||(g=!0,l.start(),k=performance.now(),f={});return this},stop:d,requestPermission:function(a){return n?Promise.resolve(!0):l.requestPermission(a).then(a=>{n=a;return Promise.resolve(a)})}}} | ||
//# sourceMappingURL=shake-monitor.esm.js.map |
@@ -5,1 +5,2 @@ 'use strict';(function(a,c){"object"===typeof exports&&"undefined"!==typeof module?module.exports=c():"function"===typeof define&&define.amd?define(c):(a="undefined"!==typeof globalThis?globalThis:a||self,a.ShakeMonitor=c())})(this,function(){function a(a){return"function"===typeof a}function c(c){let d="DeviceMotionEvent"in window,h=!a(DeviceMotionEvent.requestPermission);return{start:function(){d&&h&&window.removeEventListener("devicemotion",c,!1)},stop:function(){d&&h&&window.removeEventListener("devicemotion", | ||
(k=!0,m.start(),l=performance.now(),e={});return this},stop:d,requestPermission:function(a){return n?Promise.resolve(!0):m.requestPermission(a).then(a=>{n=a;return Promise.resolve(a)})}}}}) | ||
//# sourceMappingURL=shake-monitor.umd.js.map |
{ | ||
"name": "shake-monitor", | ||
"version": "0.2.5", | ||
"version": "0.2.6", | ||
"description": "shake-monitor", | ||
@@ -5,0 +5,0 @@ "keywords": [ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
33776
9
29