-
-
Save bgrins/b8fd30a74994e8360769 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// If the input value looks something like `font-family: arial`, then | |
// check to make sure the name and value match. Otherwise, just compare | |
// the input string directly against the name and value elements. | |
let matches = false; | |
if (propertyMatch && name && value) { | |
matches = propertyName.contains(name) && propertyValue.contains(value); | |
} else { | |
matches = (name && propertyName.contains(name)) || | |
(value && propertyValue.contains(value)); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment