function getMethod(method) { if (typeof method !== 'string') { return 'GET'; } return method.trim().toUpperCase() || 'GET'; }
app.express.get('/:gif.gif', apicache('10 minutes'), (req, res) => { const word = req.params.gif || ''; const filename = word.toUpperCase(); const uri = `https://storage.googleapis.com/is-now-illegal.appspot.com/gifs/${filename}.gif`; res.setHeader('Content-Type', 'image/gif'); res.setHeader('Access-Control-Allow-Origin', '*'); res.redirect(301, uri); });
const titleCase = (str, at = '-') => { if (!str) return str; const arr = str .toLowerCase() .split(at) .map(word => word.charAt(0).toUpperCase() + word.slice(1)); return arr.join(' '); }
function _camelCase(name) { return name. replace(SPECIAL_CHARS_REGEXP, function(_, separator, letter, offset) { return offset ? letter.toUpperCase() : letter; }). replace(MOZ_HACK_REGEXP, 'Moz$1'); }
function formatBytes(receivedBytes, decimals = 0) { const { value, unit } = byteSize(receivedBytes * 1000, { precision: decimals }); if (!unit) { return '0B'; } return `${value}${unit.toUpperCase()}`; }
name .replace(/\s+/, ' ') .split(' ') .slice(0, 2) .map((v) => v && v[0].toUpperCase()) .join('')
_recognize(method, url) { const { host, path } = parseUrl(url); const registry = this._registryForHost(host); return registry[method.toUpperCase()].recognize(path); }
var warnBadVendoredStyleName = function (name) { if (warnedStyleNames.hasOwnProperty(name) && warnedStyleNames[name]) { return; } warnedStyleNames[name] = true; error('Unsupported vendor-prefixed style property %s. Did you mean %s?', name, name.charAt(0).toUpperCase() + name.slice(1)); }
static getStemmer(locale) { if (!locale) { return new BaseStemmer(); } const name = `Stemmer${locale.slice(0, 1).toUpperCase()}${locale.slice(1)}`; const Stemmer = LangAll[name]; return Stemmer ? new Stemmer() : new BaseStemmer(); }
static getCulture(locale) { const result = cultures[locale]; if (result) { return result; } return locale ? `${locale}_${locale.toUpperCase()}` : 'en_US'; }
function _camelCase(name) { return name.replace(SPECIAL_CHARS_REGEXP, function (_, separator, letter, offset) { return offset ? letter.toUpperCase() : letter; }).replace(MOZ_HACK_REGEXP, 'Moz$1'); }
function _camelCase(name) { return name.replace(SPECIAL_CHARS_REGEXP, function (_, separator, letter, offset) { return offset ? letter.toUpperCase() : letter; }).replace(MOZ_HACK_REGEXP, 'Moz$1'); }
function _camelCase(name) { return name. replace(SPECIAL_CHARS_REGEXP, function(_, separator, letter, offset) { return offset ? letter.toUpperCase() : letter; }). replace(MOZ_HACK_REGEXP, 'Moz$1'); }
function _camelCase(name) { return name. replace(SPECIAL_CHARS_REGEXP, function(_, separator, letter, offset) { return offset ? letter.toUpperCase() : letter; }). replace(MOZ_HACK_REGEXP, 'Moz$1'); }
function getMethod(method) { if (typeof method !== 'string') { return 'GET'; } return method.trim().toUpperCase() || 'GET'; }