mirror of
https://github.com/thangisme/notes.git
synced 2025-11-23 13:12:25 -05:00
Initial commit
This commit is contained in:
16
node_modules/stylelint/lib/utils/optionsMatches.js
generated
vendored
Normal file
16
node_modules/stylelint/lib/utils/optionsMatches.js
generated
vendored
Normal file
@@ -0,0 +1,16 @@
|
||||
/* @flow */
|
||||
"use strict"
|
||||
|
||||
const matchesStringOrRegExp = require("./matchesStringOrRegExp")
|
||||
|
||||
/**
|
||||
* Check if an options object's propertyName contains a user-defined string or
|
||||
* regex that matches the passed in input.
|
||||
*/
|
||||
module.exports = function optionsMatches(
|
||||
options/*: Object*/,
|
||||
propertyName/*: string*/,
|
||||
input/*: string*/
|
||||
)/*: boolean*/ {
|
||||
return !!(options && options[propertyName] && typeof input === "string" && matchesStringOrRegExp(input.toLowerCase(), options[propertyName]))
|
||||
}
|
||||
Reference in New Issue
Block a user