fela-plugin-validator
Advanced tools
Comparing version 5.0.13 to 5.0.14
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" | ||
} | ||
} |
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
10373
155
2
+ Addedlodash@^4.17.4
+ Addedcss-in-js-utils@3.1.0(transitive)
+ Addedfast-loops@1.1.4(transitive)
+ Addedfela-utils@8.1.3(transitive)
+ Addedlodash@4.17.21(transitive)
+ Addedstring-hash@1.1.3(transitive)
- Removedcss-in-js-utils@2.0.0(transitive)
- Removedfela-utils@7.0.5(transitive)
Updatedfela-utils@^8.0.0