Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

css-vendor

Package Overview
Dependencies
Maintainers
2
Versions
33
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

css-vendor - npm Package Compare versions

Comparing version 2.0.1 to 2.0.2

4

changelog.md

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

## 2.0.2 / 2019-04-08
- Fix prefix for backdrop-filter on Edge 17/18
## 2.0.1 / 2019-03-21

@@ -2,0 +6,0 @@

2

dist/css-vendor.cjs.js

@@ -279,3 +279,3 @@ 'use strict';

if (prefix.js !== 'Webkit' && "Webkit" + pascalized in style) return prop;
if (prefix.js !== 'Webkit' && "Webkit" + pascalized in style) return "-webkit-" + prop;
return false;

@@ -282,0 +282,0 @@ }

@@ -273,3 +273,3 @@ import isInBrowser from 'is-in-browser';

if (prefix.js !== 'Webkit' && "Webkit" + pascalized in style) return prop;
if (prefix.js !== 'Webkit' && "Webkit" + pascalized in style) return "-webkit-" + prop;
return false;

@@ -276,0 +276,0 @@ }

@@ -302,3 +302,3 @@ (function (global, factory) {

if (prefix.js !== 'Webkit' && "Webkit" + pascalized in style) return prop;
if (prefix.js !== 'Webkit' && "Webkit" + pascalized in style) return "-webkit-" + prop;
return false;

@@ -305,0 +305,0 @@ }

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

!function(e,r){"object"==typeof exports&&"undefined"!=typeof module?r(exports):"function"==typeof define&&define.amd?define(["exports"],r):r((e=e||self).cssVendor={})}(this,function(e){"use strict";var r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},t="object"===("undefined"==typeof window?"undefined":r(window))&&"object"===("undefined"==typeof document?"undefined":r(document))&&9===document.nodeType,n="",o="",i="",s="";if(t){var u={Moz:"-moz-",ms:"-ms-",O:"-o-",Webkit:"-webkit-"},f=document.createElement("p").style;for(var p in u)if(p+"Transform"in f){n=p,o=u[p];break}"Webkit"===n&&"msHyphens"in f&&(n="ms",o=u.ms,s="edge"),"Webkit"===n&&"-apple-trailing-word"in f&&(i="apple")}var l={js:n,css:o,vendor:i,browser:s};function c(e){return function(e){if(Array.isArray(e)){for(var r=0,t=new Array(e.length);r<e.length;r++)t[r]=e[r];return t}}(e)||function(e){if(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e))return Array.from(e)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance")}()}var a={noPrefill:["appearance"],supportedProperty:function(e){return"appearance"===e&&("ms"===l.js?"-webkit-"+e:l.css+e)}},d=/[-\s]+(.)?/g;function y(e,r){return r?r.toUpperCase():""}function m(e){return e.replace(d,y)}function b(e){return m("-"+e)}var x,j={supportedProperty:function(e,r){return!!/^break-/.test(e)&&("Webkit"===l.js?"WebkitColumn"+b(e)in r&&l.css+"column-"+e:"Moz"===l.js&&("page"+b(e)in r&&"page-"+e))}},g={noPrefill:["text-decoration-skip-ink"],supportedProperty:function(e){return"text-decoration-skip-ink"===e&&("apple"===l.vendor?""+l.css+e:"Webkit"===l.js||"Moz"===l.js?e:l.css+e)}},k={noPrefill:["color-adjust"],supportedProperty:function(e){return"color-adjust"===e&&("Webkit"===l.js?l.css+"print-"+e:e)}},v={flex:"box-flex","flex-grow":"box-flex","flex-direction":["box-orient","box-direction"],order:"box-ordinal-group","align-items":"box-align","flex-flow":["box-orient","box-direction"],"justify-content":"box-pack"},P=Object.keys(v),w=function(e){return l.css+e},h={"flex-grow":"flex-positive","flex-shrink":"flex-negative","flex-basis":"flex-preferred-size","justify-content":"flex-pack",order:"flex-order","align-items":"flex-align","align-content":"flex-line-pack"},W=[a,{noPrefill:["transform"],supportedProperty:function(e,r,t){return"transform"===e&&(t.transform?e:l.css+e)}},{noPrefill:["transition"],supportedProperty:function(e,r,t){return"transition"===e&&(t.transition?e:l.css+e)}},{noPrefill:["mask"],supportedProperty:function(e,r){if(!/^mask/.test(e))return!1;if("Webkit"===l.js){if(m("mask-image")in r)return e;if(l.js+b("mask-image")in r)return l.css+e}return e}},{noPrefill:["writing-mode"],supportedProperty:function(e){return"writing-mode"===e&&("Webkit"===l.js||"ms"===l.js?l.css+e:e)}},k,g,j,{supportedProperty:function(e,r){if(!/^(border|margin|padding)-inline/.test(e))return!1;if("Moz"===l.js)return e;var t=e.replace("-inline","");return l.js+b(t)in r&&l.css+t}},{supportedProperty:function(e,r){return m(e)in r&&e}},{supportedProperty:function(e,r){var t=b(e);return l.js+t in r?l.css+e:"Webkit"!==l.js&&"Webkit"+t in r&&e}},{supportedProperty:function(e){return"scroll-snap"===e.substring(0,11)&&("ms"===l.js?""+l.css+e:e)}},{supportedProperty:function(e){return"overscroll-behavior"===e&&("ms"===l.js?l.css+"scroll-chaining":e)}},{supportedProperty:function(e,r){var t=h[e];return!!t&&(l.js+b(t)in r&&l.css+t)}},{supportedProperty:function(e,r,t){var n=t.multiple;if(P.indexOf(e)>-1){var o=v[e];if(!Array.isArray(o))return l.js+b(o)in r&&l.css+o;if(!n)return!1;for(var i=0;i<o.length;i++)if(!(l.js+b(o[0])in r))return!1;return o.map(w)}return!1}}],S=W.filter(function(e){return e.supportedProperty}).map(function(e){return e.supportedProperty}),A=W.filter(function(e){return e.noPrefill}).reduce(function(e,r){return e.push.apply(e,c(r.noPrefill)),e},[]),z={};if(t){x=document.createElement("p");var E=window.getComputedStyle(document.documentElement,"");for(var O in E)isNaN(O)||(z[E[O]]=E[O]);A.forEach(function(e){return delete z[e]})}function M(e,r){if(void 0===r&&(r={}),!x)return e;if(null!=z[e])return z[e];"transition"!==e&&"transform"!==e||(r[e]=e in x.style);for(var t=0;t<S.length&&(z[e]=S[t](e,x.style,r),!z[e]);t++);try{x.style[e]=""}catch(e){return!1}return z[e]}var N,C={},T={transition:1,"transition-property":1,"-webkit-transition":1,"-webkit-transition-property":1},I=/(^\s*[\w-]+)|, (\s*[\w-]+)(?![^()]*\))/g;function V(e,r,t){return"all"===r?"all":"all"===t?", all":r?M(r):", "+M(t)}t&&(N=document.createElement("p")),e.prefix=l,e.supportedKeyframes=function(e){return"-"===e[1]?e:"ms"===l.js?e:"@"+l.css+"keyframes"+e.substr(10)},e.supportedProperty=M,e.supportedValue=function(e,r){var t=r;if(!N)return r;if("string"!=typeof t||!isNaN(parseInt(t,10)))return t;var n=e+t;if(null!=C[n])return C[n];try{N.style[e]=t}catch(e){return C[n]=!1,!1}if(T[e])t=t.replace(I,V);else if(""===N.style[e]&&("-ms-flex"===(t=l.css+t)&&(N.style[e]="-ms-flexbox"),N.style[e]=t,""===N.style[e]))return C[n]=!1,!1;return N.style[e]="",C[n]=t,C[n]},Object.defineProperty(e,"__esModule",{value:!0})});
!function(e,r){"object"==typeof exports&&"undefined"!=typeof module?r(exports):"function"==typeof define&&define.amd?define(["exports"],r):r((e=e||self).cssVendor={})}(this,function(e){"use strict";var r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},t="object"===("undefined"==typeof window?"undefined":r(window))&&"object"===("undefined"==typeof document?"undefined":r(document))&&9===document.nodeType,n="",o="",i="",s="";if(t){var u={Moz:"-moz-",ms:"-ms-",O:"-o-",Webkit:"-webkit-"},f=document.createElement("p").style;for(var p in u)if(p+"Transform"in f){n=p,o=u[p];break}"Webkit"===n&&"msHyphens"in f&&(n="ms",o=u.ms,s="edge"),"Webkit"===n&&"-apple-trailing-word"in f&&(i="apple")}var l={js:n,css:o,vendor:i,browser:s};function c(e){return function(e){if(Array.isArray(e)){for(var r=0,t=new Array(e.length);r<e.length;r++)t[r]=e[r];return t}}(e)||function(e){if(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e))return Array.from(e)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance")}()}var a={noPrefill:["appearance"],supportedProperty:function(e){return"appearance"===e&&("ms"===l.js?"-webkit-"+e:l.css+e)}},d=/[-\s]+(.)?/g;function y(e,r){return r?r.toUpperCase():""}function m(e){return e.replace(d,y)}function b(e){return m("-"+e)}var x,j={supportedProperty:function(e,r){return!!/^break-/.test(e)&&("Webkit"===l.js?"WebkitColumn"+b(e)in r&&l.css+"column-"+e:"Moz"===l.js&&("page"+b(e)in r&&"page-"+e))}},k={noPrefill:["text-decoration-skip-ink"],supportedProperty:function(e){return"text-decoration-skip-ink"===e&&("apple"===l.vendor?""+l.css+e:"Webkit"===l.js||"Moz"===l.js?e:l.css+e)}},g={noPrefill:["color-adjust"],supportedProperty:function(e){return"color-adjust"===e&&("Webkit"===l.js?l.css+"print-"+e:e)}},v={flex:"box-flex","flex-grow":"box-flex","flex-direction":["box-orient","box-direction"],order:"box-ordinal-group","align-items":"box-align","flex-flow":["box-orient","box-direction"],"justify-content":"box-pack"},P=Object.keys(v),w=function(e){return l.css+e},h={"flex-grow":"flex-positive","flex-shrink":"flex-negative","flex-basis":"flex-preferred-size","justify-content":"flex-pack",order:"flex-order","align-items":"flex-align","align-content":"flex-line-pack"},W=[a,{noPrefill:["transform"],supportedProperty:function(e,r,t){return"transform"===e&&(t.transform?e:l.css+e)}},{noPrefill:["transition"],supportedProperty:function(e,r,t){return"transition"===e&&(t.transition?e:l.css+e)}},{noPrefill:["mask"],supportedProperty:function(e,r){if(!/^mask/.test(e))return!1;if("Webkit"===l.js){if(m("mask-image")in r)return e;if(l.js+b("mask-image")in r)return l.css+e}return e}},{noPrefill:["writing-mode"],supportedProperty:function(e){return"writing-mode"===e&&("Webkit"===l.js||"ms"===l.js?l.css+e:e)}},g,k,j,{supportedProperty:function(e,r){if(!/^(border|margin|padding)-inline/.test(e))return!1;if("Moz"===l.js)return e;var t=e.replace("-inline","");return l.js+b(t)in r&&l.css+t}},{supportedProperty:function(e,r){return m(e)in r&&e}},{supportedProperty:function(e,r){var t=b(e);return l.js+t in r?l.css+e:"Webkit"!==l.js&&"Webkit"+t in r&&"-webkit-"+e}},{supportedProperty:function(e){return"scroll-snap"===e.substring(0,11)&&("ms"===l.js?""+l.css+e:e)}},{supportedProperty:function(e){return"overscroll-behavior"===e&&("ms"===l.js?l.css+"scroll-chaining":e)}},{supportedProperty:function(e,r){var t=h[e];return!!t&&(l.js+b(t)in r&&l.css+t)}},{supportedProperty:function(e,r,t){var n=t.multiple;if(P.indexOf(e)>-1){var o=v[e];if(!Array.isArray(o))return l.js+b(o)in r&&l.css+o;if(!n)return!1;for(var i=0;i<o.length;i++)if(!(l.js+b(o[0])in r))return!1;return o.map(w)}return!1}}],S=W.filter(function(e){return e.supportedProperty}).map(function(e){return e.supportedProperty}),A=W.filter(function(e){return e.noPrefill}).reduce(function(e,r){return e.push.apply(e,c(r.noPrefill)),e},[]),z={};if(t){x=document.createElement("p");var E=window.getComputedStyle(document.documentElement,"");for(var O in E)isNaN(O)||(z[E[O]]=E[O]);A.forEach(function(e){return delete z[e]})}function M(e,r){if(void 0===r&&(r={}),!x)return e;if(null!=z[e])return z[e];"transition"!==e&&"transform"!==e||(r[e]=e in x.style);for(var t=0;t<S.length&&(z[e]=S[t](e,x.style,r),!z[e]);t++);try{x.style[e]=""}catch(e){return!1}return z[e]}var N,C={},T={transition:1,"transition-property":1,"-webkit-transition":1,"-webkit-transition-property":1},I=/(^\s*[\w-]+)|, (\s*[\w-]+)(?![^()]*\))/g;function V(e,r,t){return"all"===r?"all":"all"===t?", all":r?M(r):", "+M(t)}t&&(N=document.createElement("p")),e.prefix=l,e.supportedKeyframes=function(e){return"-"===e[1]?e:"ms"===l.js?e:"@"+l.css+"keyframes"+e.substr(10)},e.supportedProperty=M,e.supportedValue=function(e,r){var t=r;if(!N)return r;if("string"!=typeof t||!isNaN(parseInt(t,10)))return t;var n=e+t;if(null!=C[n])return C[n];try{N.style[e]=t}catch(e){return C[n]=!1,!1}if(T[e])t=t.replace(I,V);else if(""===N.style[e]&&("-ms-flex"===(t=l.css+t)&&(N.style[e]="-ms-flexbox"),N.style[e]=t,""===N.style[e]))return C[n]=!1,!1;return N.style[e]="",C[n]=t,C[n]},Object.defineProperty(e,"__esModule",{value:!0})});
{
"name": "css-vendor",
"description": "CSS vendor prefix detection and property feature testing.",
"version": "2.0.1",
"version": "2.0.2",
"author": {

@@ -46,3 +46,3 @@ "name": "Oleg Slobodskoi",

"@babel/preset-env": "^7.2.3",
"autoprefixer": "^9.5.0",
"autoprefixer": "^9.5.1",
"babel-cli": "^6.5.1",

@@ -49,0 +49,0 @@ "babel-eslint": "^9.0.0",

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