markdown.replace(escapedMarkdownRe, function (match) { var char = match[1]; if ("!\"#$%&'()*+,-./:;<=>?@[\\]^_`{|}~".includes(char)) { return replacement || char; } return match; })
filter(value, prop) { let isChoice = (ele, i) => [ele.name, i].includes(value); let fn = typeof value === 'function' ? value : isChoice; let choices = this.options.multiple ? this.state._choices : this.choices; let result = choices.filter(fn); if (prop) { return result.map(ch => ch[prop]); } return result; }
const staleMetadata = e => ['UNKNOWN_TOPIC_OR_PARTITION', 'LEADER_NOT_AVAILABLE', 'NOT_LEADER_FOR_PARTITION'].includes( e.type )
find(value, prop) { if (isObject(value)) return prop ? value[prop] : value; let isChoice = (ele, i) => [ele.name, i].includes(value); let fn = typeof value === 'function' ? value : isChoice; let choice = this.choices.find(fn); if (choice) { return prop ? choice[prop] : choice; } }
function getError (err) { return ['dev', 'development'].includes(process.env.NODE_ENV) ? err.stack : err.message }
static validateAllowHeaders(allowHeaders) { if (![null, undefined].includes(allowHeaders)) { if (Array.isArray(allowHeaders)) { allowHeaders.forEach(header => { if (typeof header !== 'string') { throw 'Allow headers must only contain strings'; } else if (!header.trim().length) { throw 'Allow headers must not contain empty strings'; } }); } else { throw 'Allow headers must be an array'; } } }
function customizer(objValue, srcValue, key) { // Arrays and `context` options should just replace the existing value // and not be deep merged. if (Array.isArray(objValue) || ['context'].includes(key)) { return srcValue; } }
const eligible = filePath => ['index.js', 'package.json'].includes(filePath) || /^(src|types)\//.test(filePath)
changedFiles.every(filePath => ['package.json', 'CHANGELOG.md'].includes(filePath) )
const isConsumerGroupRunning = description => ['Empty', 'Dead'].includes(description.state)
function isCtrlKey(code) { return [ 'Oa', 'Ob', 'Oc', 'Od', 'Oe', '[2^', '[3^', '[5^', '[6^', '[7^', '[8^'].includes(code) }
markdown.replace(escapedMarkdownRe, (match) => { const char = match[1]; if ("!\"#$%&'()*+,-./:;<=>?@[\\]^_`{|}~".includes(char)) { return replacement || char; } return match; })
function customizer(objValue, srcValue, key) { // Arrays and `context` options should just replace the existing value // and not be deep merged. if (Array.isArray(objValue) || ['context'].includes(key)) { return srcValue; } }
const isWordPressy = framework => { return ['wordpress', 'wordpress_network'].includes(framework); }
function isShiftKey(code) { return ['[a', '[b', '[c', '[d', '[e', '[2$', '[3$', '[5$', '[6$', '[7$', '[8$', '[Z'].includes(code) }