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

fela-plugin-validator

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-validator - npm Package Compare versions

Comparing version 1.1.0 to 1.2.0

2

dist/fela-plugin-validator.js

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

if (value instanceof Object && !Array.isArray(value)) {
if (property.indexOf(':') === 0 || property.substr(0, 6) === '@media') {
if (/^(@media|:|\[|>)/.test(property)) {
validateStyleObject(value, logInvalid, deleteInvalid);

@@ -37,0 +37,0 @@ } else {

@@ -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,o,n){Object.keys(t).forEach(function(r){var a=t[r];a instanceof Object&&!Array.isArray(a)&&(0===r.indexOf(":")||"@media"===r.substr(0,6)?e(a,o,n):(n&&delete t[r],o&&console.error((n?"[Deleted] ":" ")+"Invalid nested property. Only use nested `@media` queries or `:` pseudo classes. Maybe you forgot to add a plugin that resolves `"+r+"`.",{property:r,value:a})))})}function t(t,o,n){var r=n.logInvalid,a=n.deleteInvalid;return"keyframe"===o.type?Object.keys(t).forEach(function(e){var o=parseFloat(e),n=t[e];n instanceof Object==!1?(r&&console.error((a?"[Deleted] ":" ")+"Invalid keyframe value. An object was expected.",{percentage:e,style:n}),a&&delete t[e]):(!e.match(/from|to|%/)||e.indexOf("%")>-1&&(o<0||o>100))&&(r&&console.error((a?"[Deleted] ":" ")+"Invalid keyframe property. Expected either `to`, `from` or a percentage value between 0 and 100.",{percentage:e,style:n}),a&&delete t[e])}):"rule"===o.type&&e(t,r,a),t}var o={};o.typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol?"symbol":typeof e},o.extends=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var o=arguments[t];for(var n in o)Object.prototype.hasOwnProperty.call(o,n)&&(e[n]=o[n])}return e};var n={logInvalid:!0,deleteInvalid:!1},r=function(e){return function(r,a){return t(r,a,o.extends({},n,e))}};return r});
!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,o,n){Object.keys(t).forEach(function(r){var a=t[r];a instanceof Object&&!Array.isArray(a)&&(/^(@media|:|\[|>)/.test(r)?e(a,o,n):(n&&delete t[r],o&&console.error((n?"[Deleted] ":" ")+"Invalid nested property. Only use nested `@media` queries or `:` pseudo classes. Maybe you forgot to add a plugin that resolves `"+r+"`.",{property:r,value:a})))})}function t(t,o,n){var r=n.logInvalid,a=n.deleteInvalid;return"keyframe"===o.type?Object.keys(t).forEach(function(e){var o=parseFloat(e),n=t[e];n instanceof Object==!1?(r&&console.error((a?"[Deleted] ":" ")+"Invalid keyframe value. An object was expected.",{percentage:e,style:n}),a&&delete t[e]):(!e.match(/from|to|%/)||e.indexOf("%")>-1&&(o<0||o>100))&&(r&&console.error((a?"[Deleted] ":" ")+"Invalid keyframe property. Expected either `to`, `from` or a percentage value between 0 and 100.",{percentage:e,style:n}),a&&delete t[e])}):"rule"===o.type&&e(t,r,a),t}var o={};o.typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol?"symbol":typeof e},o.extends=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var o=arguments[t];for(var n in o)Object.prototype.hasOwnProperty.call(o,n)&&(e[n]=o[n])}return e};var n={logInvalid:!0,deleteInvalid:!1},r=function(e){return function(r,a){return t(r,a,o.extends({},n,e))}};return r});
{
"name": "fela-plugin-validator",
"version": "1.1.0",
"version": "1.2.0",
"description": "Fela plugin to validate style objects",

@@ -23,4 +23,4 @@ "main": "index.js",

"peerDependencies": {
"fela": "1.1.0"
"fela": "1.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.80kb-brightgreen.svg">
<img alt="gzipped size" src="https://img.shields.io/badge/gzipped-0.8kb-brightgreen.svg">

@@ -16,8 +16,8 @@ Enforces object validation for keyframes and rules.

Assuming you are using [npm](https://www.npmjs.com) as your package mananger you can just `npm install`.<br>
Otherwise we also provide a [UMD](https://github.com/umdjs/umd). You can easily use it via [npmcdn](https://npmcdn.com/). It registers a `FelaPluginValidator` global.
Otherwise we also provide a [UMD](https://github.com/umdjs/umd). You can easily use it via [unpkg](https://unpkg.com/). It registers a `FelaPluginValidator` global.
```HTML
<!-- Fela (Development): Unminified version including all warnings -->
<script src="https://npmcdn.com/fela-plugin-validator@1.1.0/dist/fela-plugin-validator.js"></script>
<script src="https://unpkg.com/fela-plugin-validator@1.2.0/dist/fela-plugin-validator.js"></script>
<!-- Fela (Production): Minified version -->
<script src="https://npmcdn.com/fela-plugin-validator@1.1.0/dist/fela-plugin-validator.min.js"></script>
<script src="https://unpkg.com/fela-plugin-validator@1.2.0/dist/fela-plugin-validator.min.js"></script>
```

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