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.13 to 5.0.14

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; };
/* eslint-disable no-console */
import { RULE_TYPE, KEYFRAME_TYPE, isObject, isNestedSelector, isMediaQuery } from 'fela-utils';
import isPlainObject from 'lodash/isPlainObject';
import { RULE_TYPE, KEYFRAME_TYPE, isNestedSelector, isMediaQuery } from 'fela-utils';
function validateStyleObject(style, logInvalid, deleteInvalid) {

@@ -10,3 +12,3 @@ for (var property in style) {

if (isObject(value)) {
if (isPlainObject(value)) {
if (isNestedSelector(property) || isMediaQuery(property)) {

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

var value = style[percentage];
if (!isObject(value)) {
if (!isPlainObject(value)) {
if (logInvalid) {

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

@@ -13,4 +13,10 @@ 'use strict';

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 validateStyleObject(style, logInvalid, deleteInvalid) {

@@ -20,3 +26,3 @@ for (var property in style) {

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

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

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

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

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

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

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