@pluginjs/feature
Advanced tools
Comparing version 0.7.4 to 0.7.5
/*! | ||
* @pluginjs/feature v0.7.4 (https://pluginjs.com) | ||
* Copyright 2018 Creation Studio Limited | ||
* @pluginjs/feature v0.7.5 (https://pluginjs.com) | ||
* Copyright 2019 Creation Studio Limited | ||
* Released under the GPL-3.0 License. | ||
@@ -5,0 +5,0 @@ */ |
/*! | ||
* @pluginjs/feature v0.7.4 (https://pluginjs.com) | ||
* Copyright 2018 Creation Studio Limited | ||
* @pluginjs/feature v0.7.5 (https://pluginjs.com) | ||
* Copyright 2019 Creation Studio Limited | ||
* Released under the GPL-3.0 License. | ||
*/ | ||
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});const old=()=>Boolean(/(Android\s(1.|2.))|(Silk\/1.)/i.test(navigator.userAgent)),pfx=function(){const t=["Webkit","Moz","O","ms"],n={},o=document.createElement("dummy").style;return function(e){if(void 0===n[e]){const r=e.charAt(0).toUpperCase()+e.substr(1),i=`${e} ${t.join(`${r} `)}${r}`.split(" ");n[e]=null;for(const t in i)if(void 0!==o[i[t]]){n[e]=i[t];break}}return n[e]}}();function prefixedProperty(t){return pfx(t)}const transitionProperty=()=>pfx("transition"),transformProperty=()=>pfx("transform"),animationProperty=()=>pfx("animation"),transitionEndEvent=()=>{const t={transition:"transitionend",OTransition:"oTransitionEnd",MozTransition:"transitionend",WebkitTransition:"webkitTransitionEnd"},n=document.createElement("dummy").style;for(const o in t)if(Object.prototype.hasOwnProperty.call(t,o)&&void 0!==n[o])return t[o];return!1},animationEndEvent=()=>{const t={animation:"animationend",OAnimation:"oanimationend",msAnimation:"MSAnimationEnd",MozAnimation:"animationend",WebkitAnimation:"webkitAnimationEnd"},n={};for(const o in t)if(Object.prototype.hasOwnProperty.call(t,o)&&void 0!==n[o])return t[o];return!1},transform3D=()=>{const t=!old()&&null!==pfx("perspective");return Boolean(t)},transform=()=>{const t=!old()&&null!==pfx("transformOrigin");return Boolean(t)},transition=()=>{const t=null!==pfx("transition");return Boolean(t)},sticky=()=>{let t=!1;const n=document.documentElement,o=document.createElement("div");n.appendChild(o);const e=["sticky","-webkit-sticky"];for(let n=0;n<e.length&&(o.style.position=e[n],!(t=Boolean(window.getComputedStyle(o).position.match("sticky"))));n++);return n.removeChild(o),t},svg=()=>Boolean(document.createElementNS)&&Boolean(document.createElementNS("http://www.w3.org/2000/svg","svg").createSVGRect),touch=Boolean("ontouchstart"in window||window.navigator&&window.navigator.msPointerEnabled&&window.MSGesture||window.DocumentTouch&&document instanceof DocumentTouch),pointer=!(!window.PointerEvent&&!window.MSPointerEvent);function pointerEvent(t){return window.MSPointerEvent?`MSPointer${t.charAt(9).toUpperCase()}${t.substr(10)}`:t}exports.prefixedProperty=prefixedProperty,exports.transitionProperty=transitionProperty,exports.transformProperty=transformProperty,exports.animationProperty=animationProperty,exports.transitionEndEvent=transitionEndEvent,exports.animationEndEvent=animationEndEvent,exports.transform3D=transform3D,exports.transform=transform,exports.transition=transition,exports.sticky=sticky,exports.svg=svg,exports.touch=touch,exports.pointer=pointer,exports.pointerEvent=pointerEvent; |
/*! | ||
* @pluginjs/feature v0.7.4 (https://pluginjs.com) | ||
* Copyright 2018 Creation Studio Limited | ||
* @pluginjs/feature v0.7.5 (https://pluginjs.com) | ||
* Copyright 2019 Creation Studio Limited | ||
* Released under the GPL-3.0 License. | ||
@@ -5,0 +5,0 @@ */ |
/*! | ||
* @pluginjs/feature v0.7.4 (https://pluginjs.com) | ||
* Copyright 2018 Creation Studio Limited | ||
* @pluginjs/feature v0.7.5 (https://pluginjs.com) | ||
* Copyright 2019 Creation Studio Limited | ||
* Released under the GPL-3.0 License. | ||
*/ | ||
const old=()=>Boolean(/(Android\s(1.|2.))|(Silk\/1.)/i.test(navigator.userAgent)),pfx=function(){const n=["Webkit","Moz","O","ms"],t={},o=document.createElement("dummy").style;return function(e){if(void 0===t[e]){const i=e.charAt(0).toUpperCase()+e.substr(1),r=`${e} ${n.join(`${i} `)}${i}`.split(" ");t[e]=null;for(const n in r)if(void 0!==o[r[n]]){t[e]=r[n];break}}return t[e]}}();function prefixedProperty(n){return pfx(n)}const transitionProperty=()=>pfx("transition"),transformProperty=()=>pfx("transform"),animationProperty=()=>pfx("animation"),transitionEndEvent=()=>{const n={transition:"transitionend",OTransition:"oTransitionEnd",MozTransition:"transitionend",WebkitTransition:"webkitTransitionEnd"},t=document.createElement("dummy").style;for(const o in n)if(Object.prototype.hasOwnProperty.call(n,o)&&void 0!==t[o])return n[o];return!1},animationEndEvent=()=>{const n={animation:"animationend",OAnimation:"oanimationend",msAnimation:"MSAnimationEnd",MozAnimation:"animationend",WebkitAnimation:"webkitAnimationEnd"},t={};for(const o in n)if(Object.prototype.hasOwnProperty.call(n,o)&&void 0!==t[o])return n[o];return!1},transform3D=()=>{const n=!old()&&null!==pfx("perspective");return Boolean(n)},transform=()=>{const n=!old()&&null!==pfx("transformOrigin");return Boolean(n)},transition=()=>{const n=null!==pfx("transition");return Boolean(n)},sticky=()=>{let n=!1;const t=document.documentElement,o=document.createElement("div");t.appendChild(o);const e=["sticky","-webkit-sticky"];for(let t=0;t<e.length&&(o.style.position=e[t],!(n=Boolean(window.getComputedStyle(o).position.match("sticky"))));t++);return t.removeChild(o),n},svg=()=>Boolean(document.createElementNS)&&Boolean(document.createElementNS("http://www.w3.org/2000/svg","svg").createSVGRect),touch=Boolean("ontouchstart"in window||window.navigator&&window.navigator.msPointerEnabled&&window.MSGesture||window.DocumentTouch&&document instanceof DocumentTouch),pointer=!(!window.PointerEvent&&!window.MSPointerEvent);function pointerEvent(n){return window.MSPointerEvent?`MSPointer${n.charAt(9).toUpperCase()}${n.substr(10)}`:n}export{prefixedProperty,transitionProperty,transformProperty,animationProperty,transitionEndEvent,animationEndEvent,transform3D,transform,transition,sticky,svg,touch,pointer,pointerEvent}; |
/*! | ||
* @pluginjs/feature v0.7.4 (https://pluginjs.com) | ||
* Copyright 2018 Creation Studio Limited | ||
* @pluginjs/feature v0.7.5 (https://pluginjs.com) | ||
* Copyright 2019 Creation Studio Limited | ||
* Released under the GPL-3.0 License. | ||
@@ -5,0 +5,0 @@ */ |
/*! | ||
* @pluginjs/feature v0.7.4 (https://pluginjs.com) | ||
* Copyright 2018 Creation Studio Limited | ||
* @pluginjs/feature v0.7.5 (https://pluginjs.com) | ||
* Copyright 2019 Creation Studio Limited | ||
* Released under the GPL-3.0 License. | ||
*/ | ||
!function(n,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t(n["@pluginjs/feature"]={})}(this,function(n){"use strict";var t,o,e,i=function(){return Boolean(/(Android\s(1.|2.))|(Silk\/1.)/i.test(navigator.userAgent))},r=(t=["Webkit","Moz","O","ms"],o={},e=document.createElement("dummy").style,function(n){if(void 0===o[n]){var i=n.charAt(0).toUpperCase()+n.substr(1),r="".concat(n," ").concat(t.join("".concat(i," "))).concat(i).split(" ");for(var a in o[n]=null,r)if(void 0!==e[r[a]]){o[n]=r[a];break}}return o[n]});var a=Boolean("ontouchstart"in window||window.navigator&&window.navigator.msPointerEnabled&&window.MSGesture||window.DocumentTouch&&document instanceof DocumentTouch),c=!(!window.PointerEvent&&!window.MSPointerEvent);n.prefixedProperty=function(n){return r(n)},n.transitionProperty=function(){return r("transition")},n.transformProperty=function(){return r("transform")},n.animationProperty=function(){return r("animation")},n.transitionEndEvent=function(){var n={transition:"transitionend",OTransition:"oTransitionEnd",MozTransition:"transitionend",WebkitTransition:"webkitTransitionEnd"},t=document.createElement("dummy").style;for(var o in n)if(Object.prototype.hasOwnProperty.call(n,o)&&void 0!==t[o])return n[o];return!1},n.animationEndEvent=function(){var n={animation:"animationend",OAnimation:"oanimationend",msAnimation:"MSAnimationEnd",MozAnimation:"animationend",WebkitAnimation:"webkitAnimationEnd"},t={};for(var o in n)if(Object.prototype.hasOwnProperty.call(n,o)&&void 0!==t[o])return n[o];return!1},n.transform3D=function(){var n=!i()&&null!==r("perspective");return Boolean(n)},n.transform=function(){var n=!i()&&null!==r("transformOrigin");return Boolean(n)},n.transition=function(){var n=null!==r("transition");return Boolean(n)},n.sticky=function(){var n=!1,t=document.documentElement,o=document.createElement("div");t.appendChild(o);for(var e=["sticky","-webkit-sticky"],i=0;i<e.length&&(o.style.position=e[i],!(n=Boolean(window.getComputedStyle(o).position.match("sticky"))));i++);return t.removeChild(o),n},n.svg=function(){return Boolean(document.createElementNS)&&Boolean(document.createElementNS("http://www.w3.org/2000/svg","svg").createSVGRect)},n.touch=a,n.pointer=c,n.pointerEvent=function(n){return window.MSPointerEvent?"MSPointer".concat(n.charAt(9).toUpperCase()).concat(n.substr(10)):n},Object.defineProperty(n,"__esModule",{value:!0})}); |
@@ -14,3 +14,3 @@ { | ||
}, | ||
"version": "0.7.4", | ||
"version": "0.7.5", | ||
"category": "utils", | ||
@@ -37,5 +37,5 @@ "main": "dist/feature.common.js", | ||
"devDependencies": { | ||
"@babel/core": "^7.1.5", | ||
"@babel/core": "^7.2.2", | ||
"@pluginjs/browserslist-config": "^1.2.2", | ||
"@pluginjs/cli": "^0.7.4", | ||
"@pluginjs/cli": "^0.7.5", | ||
"babel-jest": "*", | ||
@@ -67,3 +67,3 @@ "jest": "*", | ||
"title": "Plugin", | ||
"gitHead": "15dd296725c971ec08d33abd1c655b205a52ade6" | ||
"gitHead": "a5b515ae1dc38f5f84fb18c70c322d361050593c" | ||
} |
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