first commit
This commit is contained in:
20
node_modules/stylelint/lib/utils/optionsMatches.mjs
generated
vendored
Normal file
20
node_modules/stylelint/lib/utils/optionsMatches.mjs
generated
vendored
Normal file
@@ -0,0 +1,20 @@
|
||||
import matchesStringOrRegExp from './matchesStringOrRegExp.mjs';
|
||||
|
||||
/**
|
||||
* Check if an options object's propertyName contains a user-defined string or
|
||||
* regex that matches the passed in input.
|
||||
*
|
||||
* @param {{ [x: string]: any; }} options
|
||||
* @param {string} propertyName
|
||||
* @param {unknown} input
|
||||
*
|
||||
* @returns {boolean}
|
||||
*/
|
||||
export default function optionsMatches(options, propertyName, input) {
|
||||
return Boolean(
|
||||
options &&
|
||||
options[propertyName] &&
|
||||
typeof input === 'string' &&
|
||||
matchesStringOrRegExp(input, options[propertyName]),
|
||||
);
|
||||
}
|
||||
Reference in New Issue
Block a user