fela-plugin-validator
Advanced tools
Comparing version 4.1.2 to 4.2.0
@@ -60,3 +60,4 @@ (function (global, factory) { | ||
if (logInvalid) { | ||
console.error((deleteInvalid ? '[Deleted] ' : ' ') + 'Invalid nested property. Only use nested `@media` queries or `:` pseudo classes. Maybe you forgot to add a plugin that resolves `' + property + '`.', { // eslint-disable-line | ||
console.error((deleteInvalid ? '[Deleted] ' : ' ') + 'Invalid nested property. Only use nested `@media` queries or `:` pseudo classes.\n Maybe you forgot to add a plugin that resolves `' + property + '`.', { | ||
// eslint-disable-line | ||
property: property, | ||
@@ -82,3 +83,4 @@ value: value | ||
if (logInvalid) { | ||
console.error((deleteInvalid ? '[Deleted] ' : ' ') + 'Invalid keyframe value. An object was expected.', { // eslint-disable-line | ||
console.error((deleteInvalid ? '[Deleted] ' : ' ') + 'Invalid keyframe value. An object was expected.', { | ||
// eslint-disable-line | ||
percentage: percentage, | ||
@@ -95,3 +97,3 @@ style: value | ||
if (logInvalid) { | ||
console.error((deleteInvalid ? '[Deleted] ' : ' ') + 'Invalid keyframe property. Expected either `to`, `from` or a percentage value between 0 and 100.', { // eslint-disable-line | ||
console.error((deleteInvalid ? '[Deleted] ' : ' ') + 'Invalid keyframe property.\n Expected either `to`, `from` or a percentage value between 0 and 100.', { | ||
percentage: percentage, | ||
@@ -114,5 +116,8 @@ style: value | ||
var defaultOptions = { logInvalid: true, deleteInvalid: false }; | ||
var defaultOptions = { | ||
logInvalid: true, | ||
deleteInvalid: false | ||
}; | ||
var validator$1 = (function (options) { | ||
return function (style, type) { | ||
return function (style, props, type) { | ||
return validator(style, type, babelHelpers.extends({}, defaultOptions, options)); | ||
@@ -119,0 +124,0 @@ }; |
@@ -1,1 +0,1 @@ | ||
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):e.FelaPluginValidator=t()}(this,function(){"use strict";function e(t,r,o){for(var n in t){var a=t[n];a instanceof Object&&!Array.isArray(a)&&(/^(@media|:|\[|>)/.test(n)?e(a,r,o):(o&&delete t[n],r&&console.error((o?"[Deleted] ":" ")+"Invalid nested property. Only use nested `@media` queries or `:` pseudo classes. Maybe you forgot to add a plugin that resolves `"+n+"`.",{property:n,value:a})))}}function t(t,r,a){var l=a.logInvalid,i=a.deleteInvalid;if(r===n)for(var f in t){var d=parseFloat(f),u=t[f];u instanceof Object==!1?(l&&console.error((i?"[Deleted] ":" ")+"Invalid keyframe value. An object was expected.",{percentage:f,style:u}),i&&delete t[f]):(!f.match(/from|to|%/)||f.indexOf("%")>-1&&(d<0||d>100))&&(l&&console.error((i?"[Deleted] ":" ")+"Invalid keyframe property. Expected either `to`, `from` or a percentage value between 0 and 100.",{percentage:f,style:u}),i&&delete t[f])}else r===o&&e(t,l,i);return t}var r={};r.typeof="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},r.defineProperty=function(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e},r.extends=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&(e[o]=r[o])}return e};var o=1,n=2,a={logInvalid:!0,deleteInvalid:!1},l=function(e){return function(o,n){return t(o,n,r.extends({},a,e))}};return l}); | ||
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):e.FelaPluginValidator=t()}(this,function(){"use strict";function e(t,r,n){for(var o in t){var a=t[o];a instanceof Object&&!Array.isArray(a)&&(/^(@media|:|\[|>)/.test(o)?e(a,r,n):(n&&delete t[o],r&&console.error((n?"[Deleted] ":" ")+"Invalid nested property. Only use nested `@media` queries or `:` pseudo classes.\n Maybe you forgot to add a plugin that resolves `"+o+"`.",{property:o,value:a})))}}function t(t,r,a){var l=a.logInvalid,i=a.deleteInvalid;if(r===o)for(var f in t){var d=parseFloat(f),u=t[f];u instanceof Object==!1?(l&&console.error((i?"[Deleted] ":" ")+"Invalid keyframe value. An object was expected.",{percentage:f,style:u}),i&&delete t[f]):(!f.match(/from|to|%/)||f.indexOf("%")>-1&&(d<0||d>100))&&(l&&console.error((i?"[Deleted] ":" ")+"Invalid keyframe property.\n Expected either `to`, `from` or a percentage value between 0 and 100.",{percentage:f,style:u}),i&&delete t[f])}else r===n&&e(t,l,i);return t}var r={};r.typeof="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},r.defineProperty=function(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e},r.extends=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e};var n=1,o=2,a={logInvalid:!0,deleteInvalid:!1},l=function(e){return function(n,o,l){return t(n,l,r.extends({},a,e))}};return l}); |
{ | ||
"name": "fela-plugin-validator", | ||
"version": "4.1.2", | ||
"version": "4.2.0", | ||
"description": "Fela plugin to validate style objects", | ||
@@ -23,4 +23,4 @@ "main": "index.js", | ||
"peerDependencies": { | ||
"fela": "4.1.2" | ||
"fela": "4.2.0" | ||
} | ||
} |
@@ -5,3 +5,3 @@ # fela-plugin-validator | ||
<img alt="npm downloads" src="https://img.shields.io/npm/dm/fela-plugin-validator.svg"> | ||
<img alt="gzipped size" src="https://img.shields.io/badge/gzipped-0.85kb-brightgreen.svg"> | ||
<img alt="gzipped size" src="https://img.shields.io/badge/gzipped-0.86kb-brightgreen.svg"> | ||
@@ -19,5 +19,5 @@ Enforces object validation for keyframes and rules. | ||
<!-- Fela (Development): Unminified version including all warnings --> | ||
<script src="https://unpkg.com/fela-plugin-validator@4.1.2/dist/fela-plugin-validator.js"></script> | ||
<script src="https://unpkg.com/fela-plugin-validator@4.2.0/dist/fela-plugin-validator.js"></script> | ||
<!-- Fela (Production): Minified version --> | ||
<script src="https://unpkg.com/fela-plugin-validator@4.1.2/dist/fela-plugin-validator.min.js"></script> | ||
<script src="https://unpkg.com/fela-plugin-validator@4.2.0/dist/fela-plugin-validator.min.js"></script> | ||
``` | ||
@@ -24,0 +24,0 @@ |
Sorry, the diff of this file is not supported yet
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
15491
110