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

jss-plugin-default-unit

Package Overview
Dependencies
Maintainers
1
Versions
51
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

jss-plugin-default-unit - npm Package Compare versions

Comparing version 10.5.0 to 10.5.1

6

dist/jss-plugin-default-unit.bundle.js

@@ -2060,3 +2060,3 @@ function _extends() {

this.id = instanceCounter++;
this.version = "10.5.0";
this.version = "10.5.1";
this.plugins = new PluginsRegistry();

@@ -2349,2 +2349,3 @@ this.options = {

'letter-spacing': px,
'text-decoration-thickness': px,
'text-indent': px,

@@ -2383,2 +2384,3 @@ 'text-stroke': px,

'grid-gap': px,
'row-gap': px,
'grid-row-gap': px,

@@ -2444,3 +2446,3 @@ 'grid-column-gap': px,

}
} else if (typeof value === 'number') {
} else if (typeof value === 'number' && !Number.isNaN(value)) {
var unit = options[prop] || units[prop]; // Add the unit if available, except for the special case of 0px.

@@ -2447,0 +2449,0 @@

@@ -116,2 +116,3 @@ 'use strict';

'letter-spacing': px,
'text-decoration-thickness': px,
'text-indent': px,

@@ -150,2 +151,3 @@ 'text-stroke': px,

'grid-gap': px,
'row-gap': px,
'grid-row-gap': px,

@@ -211,3 +213,3 @@ 'grid-column-gap': px,

}
} else if (typeof value === 'number') {
} else if (typeof value === 'number' && !Number.isNaN(value)) {
var unit = options[prop] || units[prop]; // Add the unit if available, except for the special case of 0px.

@@ -214,0 +216,0 @@

@@ -112,2 +112,3 @@ import { hasCSSTOMSupport } from 'jss';

'letter-spacing': px,
'text-decoration-thickness': px,
'text-indent': px,

@@ -146,2 +147,3 @@ 'text-stroke': px,

'grid-gap': px,
'row-gap': px,
'grid-row-gap': px,

@@ -207,3 +209,3 @@ 'grid-column-gap': px,

}
} else if (typeof value === 'number') {
} else if (typeof value === 'number' && !Number.isNaN(value)) {
var unit = options[prop] || units[prop]; // Add the unit if available, except for the special case of 0px.

@@ -210,0 +212,0 @@

@@ -116,2 +116,3 @@ (function (global, factory) {

'letter-spacing': px,
'text-decoration-thickness': px,
'text-indent': px,

@@ -150,2 +151,3 @@ 'text-stroke': px,

'grid-gap': px,
'row-gap': px,
'grid-row-gap': px,

@@ -211,3 +213,3 @@ 'grid-column-gap': px,

}
} else if (typeof value === 'number') {
} else if (typeof value === 'number' && !Number.isNaN(value)) {
var unit = options[prop] || units[prop]; // Add the unit if available, except for the special case of 0px.

@@ -214,0 +216,0 @@

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

!function(r,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("jss")):"function"==typeof define&&define.amd?define(["exports","jss"],t):t((r="undefined"!=typeof globalThis?globalThis:r||self).jssPluginDefaultUnit={},r.jss)}(this,(function(r,t){"use strict";var i=t.hasCSSTOMSupport&&CSS?CSS.px:"px",e=t.hasCSSTOMSupport&&CSS?CSS.ms:"ms",o=t.hasCSSTOMSupport&&CSS?CSS.percent:"%";function n(r){var t=/(-[a-z])/g,i=function(r){return r[1].toUpperCase()},e={};for(var o in r)e[o]=r[o],e[o.replace(t,i)]=r[o];return e}var d=n({"animation-delay":e,"animation-duration":e,"background-position":i,"background-position-x":i,"background-position-y":i,"background-size":i,border:i,"border-bottom":i,"border-bottom-left-radius":i,"border-bottom-right-radius":i,"border-bottom-width":i,"border-left":i,"border-left-width":i,"border-radius":i,"border-right":i,"border-right-width":i,"border-top":i,"border-top-left-radius":i,"border-top-right-radius":i,"border-top-width":i,"border-width":i,"border-block":i,"border-block-end":i,"border-block-end-width":i,"border-block-start":i,"border-block-start-width":i,"border-block-width":i,"border-inline":i,"border-inline-end":i,"border-inline-end-width":i,"border-inline-start":i,"border-inline-start-width":i,"border-inline-width":i,"border-start-start-radius":i,"border-start-end-radius":i,"border-end-start-radius":i,"border-end-end-radius":i,margin:i,"margin-bottom":i,"margin-left":i,"margin-right":i,"margin-top":i,"margin-block":i,"margin-block-end":i,"margin-block-start":i,"margin-inline":i,"margin-inline-end":i,"margin-inline-start":i,padding:i,"padding-bottom":i,"padding-left":i,"padding-right":i,"padding-top":i,"padding-block":i,"padding-block-end":i,"padding-block-start":i,"padding-inline":i,"padding-inline-end":i,"padding-inline-start":i,"mask-position-x":i,"mask-position-y":i,"mask-size":i,height:i,width:i,"min-height":i,"max-height":i,"min-width":i,"max-width":i,bottom:i,left:i,top:i,right:i,inset:i,"inset-block":i,"inset-block-end":i,"inset-block-start":i,"inset-inline":i,"inset-inline-end":i,"inset-inline-start":i,"box-shadow":i,"text-shadow":i,"column-gap":i,"column-rule":i,"column-rule-width":i,"column-width":i,"font-size":i,"font-size-delta":i,"letter-spacing":i,"text-indent":i,"text-stroke":i,"text-stroke-width":i,"word-spacing":i,motion:i,"motion-offset":i,outline:i,"outline-offset":i,"outline-width":i,perspective:i,"perspective-origin-x":o,"perspective-origin-y":o,"transform-origin":o,"transform-origin-x":o,"transform-origin-y":o,"transform-origin-z":o,"transition-delay":e,"transition-duration":e,"vertical-align":i,"flex-basis":i,"shape-margin":i,size:i,gap:i,grid:i,"grid-gap":i,"grid-row-gap":i,"grid-column-gap":i,"grid-template-rows":i,"grid-template-columns":i,"grid-auto-rows":i,"grid-auto-columns":i,"box-shadow-x":i,"box-shadow-y":i,"box-shadow-blur":i,"box-shadow-spread":i,"font-line-height":i,"text-shadow-x":i,"text-shadow-y":i,"text-shadow-blur":i});function a(r,t,e){if(null==t)return t;if(Array.isArray(t))for(var o=0;o<t.length;o++)t[o]=a(r,t[o],e);else if("object"==typeof t)if("fallbacks"===r)for(var n in t)t[n]=a(n,t[n],e);else for(var s in t)t[s]=a(r+"-"+s,t[s],e);else if("number"==typeof t){var l=e[r]||d[r];return!l||0===t&&l===i?t.toString():"function"==typeof l?l(t).toString():""+t+l}return t}r.default=function(r){void 0===r&&(r={});var t=n(r);return{onProcessStyle:function(r,i){if("style"!==i.type)return r;for(var e in r)r[e]=a(e,r[e],t);return r},onChangeValue:function(r,i){return a(i,r,t)}}},Object.defineProperty(r,"__esModule",{value:!0})}));
!function(r,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("jss")):"function"==typeof define&&define.amd?define(["exports","jss"],t):t((r="undefined"!=typeof globalThis?globalThis:r||self).jssPluginDefaultUnit={},r.jss)}(this,(function(r,t){"use strict";var i=t.hasCSSTOMSupport&&CSS?CSS.px:"px",e=t.hasCSSTOMSupport&&CSS?CSS.ms:"ms",o=t.hasCSSTOMSupport&&CSS?CSS.percent:"%";function n(r){var t=/(-[a-z])/g,i=function(r){return r[1].toUpperCase()},e={};for(var o in r)e[o]=r[o],e[o.replace(t,i)]=r[o];return e}var d=n({"animation-delay":e,"animation-duration":e,"background-position":i,"background-position-x":i,"background-position-y":i,"background-size":i,border:i,"border-bottom":i,"border-bottom-left-radius":i,"border-bottom-right-radius":i,"border-bottom-width":i,"border-left":i,"border-left-width":i,"border-radius":i,"border-right":i,"border-right-width":i,"border-top":i,"border-top-left-radius":i,"border-top-right-radius":i,"border-top-width":i,"border-width":i,"border-block":i,"border-block-end":i,"border-block-end-width":i,"border-block-start":i,"border-block-start-width":i,"border-block-width":i,"border-inline":i,"border-inline-end":i,"border-inline-end-width":i,"border-inline-start":i,"border-inline-start-width":i,"border-inline-width":i,"border-start-start-radius":i,"border-start-end-radius":i,"border-end-start-radius":i,"border-end-end-radius":i,margin:i,"margin-bottom":i,"margin-left":i,"margin-right":i,"margin-top":i,"margin-block":i,"margin-block-end":i,"margin-block-start":i,"margin-inline":i,"margin-inline-end":i,"margin-inline-start":i,padding:i,"padding-bottom":i,"padding-left":i,"padding-right":i,"padding-top":i,"padding-block":i,"padding-block-end":i,"padding-block-start":i,"padding-inline":i,"padding-inline-end":i,"padding-inline-start":i,"mask-position-x":i,"mask-position-y":i,"mask-size":i,height:i,width:i,"min-height":i,"max-height":i,"min-width":i,"max-width":i,bottom:i,left:i,top:i,right:i,inset:i,"inset-block":i,"inset-block-end":i,"inset-block-start":i,"inset-inline":i,"inset-inline-end":i,"inset-inline-start":i,"box-shadow":i,"text-shadow":i,"column-gap":i,"column-rule":i,"column-rule-width":i,"column-width":i,"font-size":i,"font-size-delta":i,"letter-spacing":i,"text-decoration-thickness":i,"text-indent":i,"text-stroke":i,"text-stroke-width":i,"word-spacing":i,motion:i,"motion-offset":i,outline:i,"outline-offset":i,"outline-width":i,perspective:i,"perspective-origin-x":o,"perspective-origin-y":o,"transform-origin":o,"transform-origin-x":o,"transform-origin-y":o,"transform-origin-z":o,"transition-delay":e,"transition-duration":e,"vertical-align":i,"flex-basis":i,"shape-margin":i,size:i,gap:i,grid:i,"grid-gap":i,"row-gap":i,"grid-row-gap":i,"grid-column-gap":i,"grid-template-rows":i,"grid-template-columns":i,"grid-auto-rows":i,"grid-auto-columns":i,"box-shadow-x":i,"box-shadow-y":i,"box-shadow-blur":i,"box-shadow-spread":i,"font-line-height":i,"text-shadow-x":i,"text-shadow-y":i,"text-shadow-blur":i});function a(r,t,e){if(null==t)return t;if(Array.isArray(t))for(var o=0;o<t.length;o++)t[o]=a(r,t[o],e);else if("object"==typeof t)if("fallbacks"===r)for(var n in t)t[n]=a(n,t[n],e);else for(var s in t)t[s]=a(r+"-"+s,t[s],e);else if("number"==typeof t&&!Number.isNaN(t)){var l=e[r]||d[r];return!l||0===t&&l===i?t.toString():"function"==typeof l?l(t).toString():""+t+l}return t}r.default=function(r){void 0===r&&(r={});var t=n(r);return{onProcessStyle:function(r,i){if("style"!==i.type)return r;for(var e in r)r[e]=a(e,r[e],t);return r},onChangeValue:function(r,i){return a(i,r,t)}}},Object.defineProperty(r,"__esModule",{value:!0})}));
{
"name": "jss-plugin-default-unit",
"description": "JSS plugin that adds default custom unit to numeric values where needed",
"version": "10.5.0",
"version": "10.5.1",
"license": "MIT",

@@ -39,11 +39,11 @@ "homepage": "https://cssinjs.org/jss-default-unit",

"devDependencies": {
"jss-plugin-expand": "10.5.0",
"jss-plugin-rule-value-function": "10.5.0",
"jss-plugin-rule-value-observable": "10.5.0"
"jss-plugin-expand": "10.5.1",
"jss-plugin-rule-value-function": "10.5.1",
"jss-plugin-rule-value-observable": "10.5.1"
},
"dependencies": {
"@babel/runtime": "^7.3.1",
"jss": "10.5.0"
"jss": "10.5.1"
},
"gitHead": "f9d93723ea0b8748c8a89248ebb680ed07e95c48"
"gitHead": "a9f2288adcb26bf6377d3dd2f39c5f13580988d6"
}

@@ -12,3 +12,3 @@ # jss-plugin-default-unit

See our website [jss-plugin-default-unit](https://cssinjs.org/jss-plugin-default-unit?v=v10.5.0) for more information.
See our website [jss-plugin-default-unit](https://cssinjs.org/jss-plugin-default-unit?v=v10.5.1) for more information.

@@ -15,0 +15,0 @@ ## Install

@@ -124,2 +124,3 @@ // @flow

'letter-spacing': px,
'text-decoration-thickness': px,
'text-indent': px,

@@ -166,2 +167,3 @@ 'text-stroke': px,

'grid-gap': px,
'row-gap': px,
'grid-row-gap': px,

@@ -168,0 +170,0 @@ 'grid-column-gap': px,

@@ -43,3 +43,3 @@ // @flow

}
} else if (typeof value === 'number') {
} else if (typeof value === 'number' && !Number.isNaN(value)) {
const unit = options[prop] || units[prop]

@@ -46,0 +46,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