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 5.0.14 to 5.0.15

8

es/index.js
var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; };
/* eslint-disable no-console */
import isPlainObject from 'lodash/isPlainObject';
import { RULE_TYPE, KEYFRAME_TYPE, isNestedSelector, isMediaQuery } from 'fela-utils';
function isPlainObject(obj) {
return (typeof obj === 'undefined' ? 'undefined' : _typeof(obj)) === 'object' && !Array.isArray(obj);
}
function validateStyleObject(style, logInvalid, deleteInvalid) {

@@ -9,0 +13,0 @@ for (var property in style) {

@@ -8,2 +8,4 @@ 'use strict';

var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; };
/* eslint-disable no-console */

@@ -14,9 +16,7 @@

var _isPlainObject = require('lodash/isPlainObject');
var _isPlainObject2 = _interopRequireDefault(_isPlainObject);
var _felaUtils = require('fela-utils');
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
function isPlainObject(obj) {
return (typeof obj === 'undefined' ? 'undefined' : _typeof(obj)) === 'object' && !Array.isArray(obj);
}

@@ -27,3 +27,3 @@ function validateStyleObject(style, logInvalid, deleteInvalid) {

if ((0, _isPlainObject2.default)(value)) {
if (isPlainObject(value)) {
if ((0, _felaUtils.isNestedSelector)(property) || (0, _felaUtils.isMediaQuery)(property)) {

@@ -55,3 +55,3 @@ validateStyleObject(value, logInvalid, deleteInvalid);

var value = style[percentage];
if (!(0, _isPlainObject2.default)(value)) {
if (!isPlainObject(value)) {
if (logInvalid) {

@@ -58,0 +58,0 @@ console.error((deleteInvalid ? '[Deleted] ' : ' ') + 'Invalid keyframe value. An object was expected.', {

{
"name": "fela-plugin-validator",
"version": "5.0.14",
"version": "5.0.15",
"description": "Fela plugin to validate style objects",

@@ -25,5 +25,4 @@ "main": "lib/index.js",

"dependencies": {
"fela-utils": "^8.0.0",
"lodash": "^4.17.4"
"fela-utils": "^8.0.1"
}
}
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