app.use(serveStatic(path.join(__dirname, '../playground'), { lastModified: false, etag: false, setHeaders: (res, url) => { if (url.indexOf('/index.html') !== -1) { res.setHeader('Cache-Control', 'no-cache'); } } }));
function simplifyObject(object) { return Object.keys(object) .filter(k => k.indexOf('_') !== 0) .filter(k => typeof object[k] !== 'function') .filter(k => typeof object[k] !== 'object') .reduce((obj, key) => { obj[key] = object[key]; return obj; }, {}); }
result.map(function(name) { if (name.indexOf('req.') === 0) { name = reqHeaders[name.substring(4)]; name && reqResult.push(name); return; } return headers[name]; }).filter(noop)
/** * Check if element has class. * @param {Element} element - The DOM element. * @param {string} cls - The class name string. */ function jqLiteHasClass(element, cls) { if (!cls || !element.getAttribute) return false; return _getExistingClasses(element).indexOf(' ' + cls + ' ') > -1; }
/** * Checks if a ISO8601 formatted date contains a timezone component * @param pushTimeParam {string} * @returns {boolean} */ static pushTimeHasTimezoneComponent(pushTimeParam) { const offsetPattern = /(.+)([+-])\d\d:\d\d$/; return pushTimeParam.indexOf('Z') === pushTimeParam.length - 1 || // 2007-04-05T12:30Z offsetPattern.test(pushTimeParam); // 2007-04-05T12:30.000+02:00, 2007-04-05T12:30.000-02:00 }
https.createServer(options, function(req, res) { if (req.url.indexOf('test-remote.rules') !== -1) { return res.end('str2.w2.org/index.html file://`(${search.replace(a,b)})`\nstr2.w2.org/index2.html file://`(${query.replace(/a/g,b)})`'); } res.end(JSON.stringify({ headers: req.headers, body: 'test' })); }).listen(config.httpsPort, startTest);
source() { let value = this.value || '\n'; let short = <ReplOutputString str={value.slice(0, value.indexOf('\n'))} limit={ReplConstants.OUTPUT_TRUNCATE_LENGTH / 2}/>; return <ReplOutputCljsSource short={short} source={ReplCommon.highlight(this.value)}/> }
/** * Indicates the index of a given alpha character. * @param {Character} c Character to be checked. * @returns Index of the character, -1 if is invalid. */ static alphaIndex(c) { return XTableUtils.alphachars.indexOf(c); }
function filterHeader(obj) { var o={}; for(var key in obj) { if(key.indexOf("-doclever")==-1) { o[key]=obj[key]; } } return o; }
/** * Check if element has class. * @param {Element} element - The DOM element. * @param {string} cls - The class name string. */ function jqLiteHasClass(element, cls) { if (!cls || !element.getAttribute) return false; return _getExistingClasses(element).indexOf(' ' + cls + ' ') > -1; }
/** * Check if element has class. * @param {Element} element - The DOM element. * @param {string} cls - The class name string. */ function jqLiteHasClass(element, cls) { if (!cls || !element.getAttribute) return false; return _getExistingClasses(element).indexOf(' ' + cls + ' ') > -1; }
/** * Check if element has class. * @param {Element} element - The DOM element. * @param {string} cls - The class name string. */ function jqLiteHasClass(element, cls) { if (!cls || !element.getAttribute) return false; return (_getExistingClasses(element).indexOf(' ' + cls + ' ') > -1); }
/** * Returns true if we detect a core Gutenberg comment block * * @param {string } content - html string * @returns { boolean } true if we think we found a block */ export function hasGutenbergBlocks( content ) { return !! content && content.indexOf( '<!-- wp:' ) !== -1; }
/** * Check if element has class. * @param {Element} element - The DOM element. * @param {string} cls - The class name string. */ function jqLiteHasClass(element, cls) { if (!cls || !element.getAttribute) return false; return _getExistingClasses(element).indexOf(' ' + cls + ' ') > -1; }
/** * Check if element has class. * @param {Element} element - The DOM element. * @param {string} cls - The class name string. */ function jqLiteHasClass(element, cls) { if (!cls || !element.getAttribute) return false; return (_getExistingClasses(element).indexOf(' ' + cls + ' ') > -1); }