Socket
Socket
Sign inDemoInstall

shorter-js

Package Overview
Dependencies
Maintainers
1
Versions
82
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

shorter-js - npm Package Compare versions

Comparing version 0.0.6 to 0.0.7

4

dist/shorter-js.esm.js
/*!
* shorter-js v0.0.6 (https://thednp.github.io/shorter-js/)
* shorter-js v0.0.7 (https://thednp.github.io/shorter-js/)
* Copyright 2019-2020 © dnp_theme

@@ -12,3 +12,3 @@ * Licensed under MIT (https://github.com/thednp/shorter-js/blob/master/LICENSE)

var mouseSwipeEvents = { start: 'mousedown', end: 'mouseup', move:'mousemove', cancel:'mouseup' };
var mouseSwipeEvents = { start: 'mousedown', end: 'mouseup', move:'mousemove', cancel:'mouseout' };

@@ -15,0 +15,0 @@ var transitionDuration = 'webkitTransition' in document.body.style ? 'webkitTransitionDuration' : 'transitionDuration';

@@ -1,2 +0,2 @@

// shorter-js v0.0.6 | dnp_theme © 2020 | MIT-License
var t={down:"mousedown",up:"mouseup"},n="onmouseleave"in document?["mouseenter","mouseleave"]:["mouseover","mouseout"],e={start:"touchstart",end:"touchend",move:"touchmove",cancel:"touchcancel"},o={start:"mousedown",end:"mouseup",move:"mousemove",cancel:"mouseup"},i="webkitTransition"in document.body.style?"webkitTransitionDuration":"transitionDuration",u="webkitTransition"in document.body.style?"webkitTransitionEnd":"transitionend",r=/iPhone|iPad|iPod|Android/i.test(navigator.userAgent),c="webkitPerspective"in document.body.style||"perspective"in document.body.style;function s(t,n,e,o){o=o||!1,t.addEventListener(n,e,o)}function a(t,n,e,o){o=o||!1,t.removeEventListener(n,e,o)}function d(t,n,e,o){s(t,n,(function i(u){u.target===t&&(e(u),a(t,n,i,o))}),o)}var m=function(){var t=!1;try{var n=Object.defineProperty({},"passive",{get:function(){t=!0}});d(document,"DOMContentLoaded",(function(){}),n)}catch(t){}return t}(),l="webkitTransform"in document.body.style||"transform"in document.body.style,v="ontouchstart"in window||navigator.msMaxTouchPoints||!1,f="webkitTransition"in document.body.style||"transition"in document.body.style;function y(t,n){t.classList.add(n)}function w(t,n){t.classList.remove(n)}function b(t,n){return t.classList.contains(n)}function h(t){var n=f?window.getComputedStyle(t)[i]:0;return n="number"!=typeof(n=parseFloat(n))||isNaN(n)?0:1e3*n}function p(t,n){var e=0;h(t)?d(t,u,(function(t){!e&&n(t),e=1})):setTimeout((function(){!e&&n(),e=1}),17)}function g(t){var n=t.getBoundingClientRect(),e=window.innerHeight||document.documentElement.clientHeight;return n.top<=e&&n.bottom>=0}function E(t){var n=t.getBoundingClientRect();return n.top>=0&&n.left>=0&&n.bottom<=(window.innerHeight||document.documentElement.clientHeight)&&n.right<=(window.innerWidth||document.documentElement.clientWidth)}var T=!!m&&{passive:!0};function k(t,n){var e=n&&n instanceof Element?n:document;return t instanceof Element?t:e.querySelector(t)}function L(t,n){try{t()}catch(t){console.error(n+": "+t)}}export{y as addClass,p as emulateTransitionEnd,h as getElementTransitionDuration,b as hasClass,g as isElementInScrollRange,E as isElementInViewport,r as isMobile,t as mouseClickEvents,n as mouseHoverEvents,o as mouseSwipeEvents,a as off,s as on,d as one,T as passiveHandler,k as queryElement,w as removeClass,c as support3DTransform,m as supportPassive,v as supportTouch,l as supportTransform,f as supportTransition,e as touchEvents,i as transitionDuration,u as transitionEndEvent,L as tryWrapper};
// shorter-js v0.0.7 | dnp_theme © 2020 | MIT-License
var t={down:"mousedown",up:"mouseup"},n="onmouseleave"in document?["mouseenter","mouseleave"]:["mouseover","mouseout"],e={start:"touchstart",end:"touchend",move:"touchmove",cancel:"touchcancel"},o={start:"mousedown",end:"mouseup",move:"mousemove",cancel:"mouseout"},i="webkitTransition"in document.body.style?"webkitTransitionDuration":"transitionDuration",u="webkitTransition"in document.body.style?"webkitTransitionEnd":"transitionend",r=/iPhone|iPad|iPod|Android/i.test(navigator.userAgent),c="webkitPerspective"in document.body.style||"perspective"in document.body.style;function s(t,n,e,o){o=o||!1,t.addEventListener(n,e,o)}function a(t,n,e,o){o=o||!1,t.removeEventListener(n,e,o)}function d(t,n,e,o){s(t,n,(function i(u){u.target===t&&(e(u),a(t,n,i,o))}),o)}var m=function(){var t=!1;try{var n=Object.defineProperty({},"passive",{get:function(){t=!0}});d(document,"DOMContentLoaded",(function(){}),n)}catch(t){}return t}(),l="webkitTransform"in document.body.style||"transform"in document.body.style,v="ontouchstart"in window||navigator.msMaxTouchPoints||!1,f="webkitTransition"in document.body.style||"transition"in document.body.style;function y(t,n){t.classList.add(n)}function w(t,n){t.classList.remove(n)}function b(t,n){return t.classList.contains(n)}function h(t){var n=f?window.getComputedStyle(t)[i]:0;return n="number"!=typeof(n=parseFloat(n))||isNaN(n)?0:1e3*n}function g(t,n){var e=0;h(t)?d(t,u,(function(t){!e&&n(t),e=1})):setTimeout((function(){!e&&n(),e=1}),17)}function p(t){var n=t.getBoundingClientRect(),e=window.innerHeight||document.documentElement.clientHeight;return n.top<=e&&n.bottom>=0}function E(t){var n=t.getBoundingClientRect();return n.top>=0&&n.left>=0&&n.bottom<=(window.innerHeight||document.documentElement.clientHeight)&&n.right<=(window.innerWidth||document.documentElement.clientWidth)}var T=!!m&&{passive:!0};function k(t,n){var e=n&&n instanceof Element?n:document;return t instanceof Element?t:e.querySelector(t)}function L(t,n){try{t()}catch(t){console.error(n+": "+t)}}export{y as addClass,g as emulateTransitionEnd,h as getElementTransitionDuration,b as hasClass,p as isElementInScrollRange,E as isElementInViewport,r as isMobile,t as mouseClickEvents,n as mouseHoverEvents,o as mouseSwipeEvents,a as off,s as on,d as one,T as passiveHandler,k as queryElement,w as removeClass,c as support3DTransform,m as supportPassive,v as supportTouch,l as supportTransform,f as supportTransition,e as touchEvents,i as transitionDuration,u as transitionEndEvent,L as tryWrapper};
/*!
* shorter-js v0.0.6 (https://thednp.github.io/shorter-js/)
* shorter-js v0.0.7 (https://thednp.github.io/shorter-js/)
* Copyright 2019-2020 © dnp_theme

@@ -18,3 +18,3 @@ * Licensed under MIT (https://github.com/thednp/shorter-js/blob/master/LICENSE)

var mouseSwipeEvents = { start: 'mousedown', end: 'mouseup', move:'mousemove', cancel:'mouseup' };
var mouseSwipeEvents = { start: 'mousedown', end: 'mouseup', move:'mousemove', cancel:'mouseout' };

@@ -21,0 +21,0 @@ var transitionDuration = 'webkitTransition' in document.body.style ? 'webkitTransitionDuration' : 'transitionDuration';

@@ -1,2 +0,2 @@

// shorter-js v0.0.6 | dnp_theme © 2020 | MIT-License
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((e=e||self).SHORTER={})}(this,(function(e){"use strict";var t="onmouseleave"in document?["mouseenter","mouseleave"]:["mouseover","mouseout"],n="webkitTransition"in document.body.style?"webkitTransitionDuration":"transitionDuration",o="webkitTransition"in document.body.style?"webkitTransitionEnd":"transitionend",i=/iPhone|iPad|iPod|Android/i.test(navigator.userAgent),s="webkitPerspective"in document.body.style||"perspective"in document.body.style;function r(e,t,n,o){o=o||!1,e.addEventListener(t,n,o)}function u(e,t,n,o){o=o||!1,e.removeEventListener(t,n,o)}function c(e,t,n,o){r(e,t,(function i(s){s.target===e&&(n(s),u(e,t,i,o))}),o)}var a=function(){var e=!1;try{var t=Object.defineProperty({},"passive",{get:function(){e=!0}});c(document,"DOMContentLoaded",(function(){}),t)}catch(e){}return e}(),d="webkitTransform"in document.body.style||"transform"in document.body.style,m="ontouchstart"in window||navigator.msMaxTouchPoints||!1,l="webkitTransition"in document.body.style||"transition"in document.body.style;function f(e){var t=l?window.getComputedStyle(e)[n]:0;return t="number"!=typeof(t=parseFloat(t))||isNaN(t)?0:1e3*t}var p=!!a&&{passive:!0};e.addClass=function(e,t){e.classList.add(t)},e.emulateTransitionEnd=function(e,t){var n=0;f(e)?c(e,o,(function(e){!n&&t(e),n=1})):setTimeout((function(){!n&&t(),n=1}),17)},e.getElementTransitionDuration=f,e.hasClass=function(e,t){return e.classList.contains(t)},e.isElementInScrollRange=function(e){var t=e.getBoundingClientRect(),n=window.innerHeight||document.documentElement.clientHeight;return t.top<=n&&t.bottom>=0},e.isElementInViewport=function(e){var t=e.getBoundingClientRect();return t.top>=0&&t.left>=0&&t.bottom<=(window.innerHeight||document.documentElement.clientHeight)&&t.right<=(window.innerWidth||document.documentElement.clientWidth)},e.isMobile=i,e.mouseClickEvents={down:"mousedown",up:"mouseup"},e.mouseHoverEvents=t,e.mouseSwipeEvents={start:"mousedown",end:"mouseup",move:"mousemove",cancel:"mouseup"},e.off=u,e.on=r,e.one=c,e.passiveHandler=p,e.queryElement=function(e,t){var n=t&&t instanceof Element?t:document;return e instanceof Element?e:n.querySelector(e)},e.removeClass=function(e,t){e.classList.remove(t)},e.support3DTransform=s,e.supportPassive=a,e.supportTouch=m,e.supportTransform=d,e.supportTransition=l,e.touchEvents={start:"touchstart",end:"touchend",move:"touchmove",cancel:"touchcancel"},e.transitionDuration=n,e.transitionEndEvent=o,e.tryWrapper=function(e,t){try{e()}catch(e){console.error(t+": "+e)}},Object.defineProperty(e,"__esModule",{value:!0})}));
// shorter-js v0.0.7 | dnp_theme © 2020 | MIT-License
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((e=e||self).SHORTER={})}(this,(function(e){"use strict";var t="onmouseleave"in document?["mouseenter","mouseleave"]:["mouseover","mouseout"],n="webkitTransition"in document.body.style?"webkitTransitionDuration":"transitionDuration",o="webkitTransition"in document.body.style?"webkitTransitionEnd":"transitionend",i=/iPhone|iPad|iPod|Android/i.test(navigator.userAgent),s="webkitPerspective"in document.body.style||"perspective"in document.body.style;function r(e,t,n,o){o=o||!1,e.addEventListener(t,n,o)}function u(e,t,n,o){o=o||!1,e.removeEventListener(t,n,o)}function c(e,t,n,o){r(e,t,(function i(s){s.target===e&&(n(s),u(e,t,i,o))}),o)}var a=function(){var e=!1;try{var t=Object.defineProperty({},"passive",{get:function(){e=!0}});c(document,"DOMContentLoaded",(function(){}),t)}catch(e){}return e}(),d="webkitTransform"in document.body.style||"transform"in document.body.style,m="ontouchstart"in window||navigator.msMaxTouchPoints||!1,l="webkitTransition"in document.body.style||"transition"in document.body.style;function f(e){var t=l?window.getComputedStyle(e)[n]:0;return t="number"!=typeof(t=parseFloat(t))||isNaN(t)?0:1e3*t}var v=!!a&&{passive:!0};e.addClass=function(e,t){e.classList.add(t)},e.emulateTransitionEnd=function(e,t){var n=0;f(e)?c(e,o,(function(e){!n&&t(e),n=1})):setTimeout((function(){!n&&t(),n=1}),17)},e.getElementTransitionDuration=f,e.hasClass=function(e,t){return e.classList.contains(t)},e.isElementInScrollRange=function(e){var t=e.getBoundingClientRect(),n=window.innerHeight||document.documentElement.clientHeight;return t.top<=n&&t.bottom>=0},e.isElementInViewport=function(e){var t=e.getBoundingClientRect();return t.top>=0&&t.left>=0&&t.bottom<=(window.innerHeight||document.documentElement.clientHeight)&&t.right<=(window.innerWidth||document.documentElement.clientWidth)},e.isMobile=i,e.mouseClickEvents={down:"mousedown",up:"mouseup"},e.mouseHoverEvents=t,e.mouseSwipeEvents={start:"mousedown",end:"mouseup",move:"mousemove",cancel:"mouseout"},e.off=u,e.on=r,e.one=c,e.passiveHandler=v,e.queryElement=function(e,t){var n=t&&t instanceof Element?t:document;return e instanceof Element?e:n.querySelector(e)},e.removeClass=function(e,t){e.classList.remove(t)},e.support3DTransform=s,e.supportPassive=a,e.supportTouch=m,e.supportTransform=d,e.supportTransition=l,e.touchEvents={start:"touchstart",end:"touchend",move:"touchmove",cancel:"touchcancel"},e.transitionDuration=n,e.transitionEndEvent=o,e.tryWrapper=function(e,t){try{e()}catch(e){console.error(t+": "+e)}},Object.defineProperty(e,"__esModule",{value:!0})}));
{
"name": "shorter-js",
"version": "0.0.6",
"version": "0.0.7",
"description": "A small ES6/ES7 library with various JavaScript tools useful for creating light libraries.",

@@ -5,0 +5,0 @@ "main": "dist/shorter-js.min.js",

@@ -1,1 +0,1 @@

export const mouseSwipeEvents = { start: 'mousedown', end: 'mouseup', move:'mousemove', cancel:'mouseup' }
export const mouseSwipeEvents = { start: 'mousedown', end: 'mouseup', move:'mousemove', cancel:'mouseout' }
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc