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

fela-plugin-unit

Package Overview
Dependencies
Maintainers
1
Versions
111
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

fela-plugin-unit - npm Package Compare versions

Comparing version 1.0.0-alpha.6 to 1.0.0-beta.1

index.js

35

dist/fela-plugin-unit.js

@@ -38,17 +38,2 @@ (function (global, factory) {

babelHelpers.defineProperty = function (obj, key, value) {
if (key in obj) {
Object.defineProperty(obj, key, {
value: value,
enumerable: true,
configurable: true,
writable: true
});
} else {
obj[key] = value;
}
return obj;
};
babelHelpers.extends = Object.assign || function (target) {

@@ -250,23 +235,23 @@ for (var i = 1; i < arguments.length; i++) {

warning$1(unit.match(/ch|em|ex|rem|vh|vw|vmin|vmax|px|cm|mm|in|pc|pt|mozmm|%/) === null, 'You are using an invalid unit `' + unit + '`. Consider using one of the following ch, em, ex, rem, vh, vw, vmin, vmax, px, cm, mm, in, pc, pt, mozmm or %.');
warning$1(unit.match(/ch|em|ex|rem|vh|vw|vmin|vmax|px|cm|mm|in|pc|pt|mozmm|%/) !== null, 'You are using an invalid unit `' + unit + '`. Consider using one of the following ch, em, ex, rem, vh, vw, vmin, vmax, px, cm, mm, in, pc, pt, mozmm or %.');
return function (pluginInterface) {
var styles = pluginInterface.styles;
var processStyles = pluginInterface.processStyles;
var style = pluginInterface.style;
var processStyle = pluginInterface.processStyle;
Object.keys(styles).forEach(function (property) {
Object.keys(style).forEach(function (property) {
if (!isUnitlessCSSProperty(property)) {
var value = styles[property];
var value = style[property];
if (Array.isArray(value)) {
styles[property] = value.map(function (value) {
style[property] = value.map(function (value) {
return addUnitIfNeeded(property, value, unit);
});
} else if (value instanceof Object) {
styles[property] = processStyles(babelHelpers.extends({}, pluginInterface, {
styles: value
style[property] = processStyle(babelHelpers.extends({}, pluginInterface, {
style: value
}));
} else {
styles[property] = addUnitIfNeeded(property, value, unit);
style[property] = addUnitIfNeeded(property, value, unit);
}

@@ -276,3 +261,3 @@ }

return styles;
return style;
};

@@ -279,0 +264,0 @@ }

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

!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):t.FelaPluginUnit=e()}(this,function(){"use strict";function t(t,e){return e={exports:{}},t(e,e.exports),e.exports}function e(t,e,n){var o="undefined"==typeof e?"undefined":r["typeof"](e);return("number"===o||"string"===o&&e==parseFloat(e))&&(e+=n),e}function n(){var t=arguments.length<=0||void 0===arguments[0]?"px":arguments[0];return function(n){var o=n.styles,i=n.processStyles;return Object.keys(o).forEach(function(u){if(!a(u)){var f=o[u];Array.isArray(f)?o[u]=f.map(function(n){return e(u,n,t)}):f instanceof Object?o[u]=i(r["extends"]({},n,{styles:f})):o[u]=e(u,f,t)}}),o}}var r={};r["typeof"]="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol?"symbol":typeof t},r.classCallCheck=function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")},r.createClass=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),r.defineProperty=function(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t},r["extends"]=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t};var o=t(function(t){function e(t){return function(){return t}}var n=function(){};n.thatReturns=e,n.thatReturnsFalse=e(!1),n.thatReturnsTrue=e(!0),n.thatReturnsNull=e(null),n.thatReturnsThis=function(){return this},n.thatReturnsArgument=function(t){return t},t.exports=n}),i=o&&"object"==typeof o&&"default"in o?o["default"]:o,u=(t(function(t){var e=i,n=e;t.exports=n}),t(function(t){function e(t,e){return t+e.charAt(0).toUpperCase()+e.slice(1)}var n={animationIterationCount:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridRow:!0,gridColumn:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},r=["Webkit","ms","Moz","O"];Object.keys(n).forEach(function(t){r.forEach(function(r){n[e(r,t)]=!0})}),t.exports=function(t){return n[t]}})),a=u&&"object"==typeof u&&"default"in u?u["default"]:u;return n});
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):t.FelaPluginUnit=e()}(this,function(){"use strict";function t(t,e){return e={exports:{}},t(e,e.exports),e.exports}function e(t,e,n){var o="undefined"==typeof e?"undefined":r["typeof"](e);return("number"===o||"string"===o&&e==parseFloat(e))&&(e+=n),e}function n(){var t=arguments.length<=0||void 0===arguments[0]?"px":arguments[0];return function(n){var o=n.style,i=n.processStyle;return Object.keys(o).forEach(function(u){if(!a(u)){var f=o[u];Array.isArray(f)?o[u]=f.map(function(n){return e(u,n,t)}):f instanceof Object?o[u]=i(r["extends"]({},n,{style:f})):o[u]=e(u,f,t)}}),o}}var r={};r["typeof"]="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol?"symbol":typeof t},r.classCallCheck=function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")},r.createClass=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),r["extends"]=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t};var o=t(function(t){function e(t){return function(){return t}}var n=function(){};n.thatReturns=e,n.thatReturnsFalse=e(!1),n.thatReturnsTrue=e(!0),n.thatReturnsNull=e(null),n.thatReturnsThis=function(){return this},n.thatReturnsArgument=function(t){return t},t.exports=n}),i=o&&"object"==typeof o&&"default"in o?o["default"]:o,u=(t(function(t){var e=i,n=e;t.exports=n}),t(function(t){function e(t,e){return t+e.charAt(0).toUpperCase()+e.slice(1)}var n={animationIterationCount:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridRow:!0,gridColumn:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},r=["Webkit","ms","Moz","O"];Object.keys(n).forEach(function(t){r.forEach(function(r){n[e(r,t)]=!0})}),t.exports=function(t){return n[t]}})),a=u&&"object"==typeof u&&"default"in u?u["default"]:u;return n});
{
"name": "fela-plugin-unit",
"version": "1.0.0-alpha.6",
"description": "Fela plugin to automatically add units if required",
"main": "unit.js",
"files": [
"LICENSE",
"README.md",
"unit.js",
"dist"
],
"repository": "https://github.com/rofrischmann/fela/",
"keywords": [
"fela",
"fela-plugin",
"cssinjs"
],
"author": "Robin Frischmann",
"license": "MIT",
"peerDependencies": {
"fela": "^1.0.0-alpha.6"
},
"dependencies": {
"unitless-css-property": "^1.0.0"
}
"name": "fela-plugin-unit",
"version": "1.0.0-beta.1",
"description": "Fela plugin to automatically add units if required",
"main": "index.js",
"files": [
"LICENSE",
"README.md",
"index.js",
"/dist"
],
"repository": "https://github.com/rofrischmann/fela/",
"keywords": [
"fela",
"fela-plugin",
"cssinjs"
],
"author": "Robin Frischmann",
"license": "MIT",
"dependencies": {
"unitless-css-property": "^1.0.0"
}
}

Sorry, the diff of this file is not supported yet

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