fela-plugin-validator
Advanced tools
Comparing version 5.0.14 to 5.0.15
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" | ||
} | ||
} |
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
10868
1
159
- Removedlodash@^4.17.4
- Removedlodash@4.17.21(transitive)
Updatedfela-utils@^8.0.1