/** * Returns a function to use in pseudos for input types * @param {String} type */ function createInputPseudo( type ) { return function( elem ) { var name = elem.nodeName.toLowerCase(); return name === "input" && elem.type === type; }; }
addHandle( "value", function( elem, name, isXML ) { if ( !isXML && elem.nodeName.toLowerCase() === "input" ) { return elem.defaultValue; } });
// Slug export function slug(text) { return text.toString().toLowerCase() .replace(/\s+/g, '-') // Replace spaces with - .replace(/[^\w\-]+/g, '') // Remove all non-word chars //.replace(/\-\-+/g, '-') // Replace multiple - with single - .replace(/^-+/, '') // Trim - from start of text .replace(/-+$/, '') // Trim - from end of text }
function assertNodeMatch(node, vnode, inVPre) { if (isDef(vnode.tag)) { return vnode.tag.indexOf('vue-component') === 0 || (!isUnknownElement(vnode, inVPre) && vnode.tag.toLowerCase() === (node.tagName && node.tagName.toLowerCase()) ) } else { return node.nodeType === (vnode.isComment ? 8 : 3) } }
Object.keys(newTrailers).forEach(function(key) { var lkey = key.toLowerCase(); if ((!delTrailers || !delTrailers[lkey]) && ILLEGAL_TRALIERS.indexOf(lkey) === -1) { nameMap[lkey] = key; } });
autoRollupNameSuffix(cube, aggregation) { // eslint-disable-next-line prefer-template return '_' + aggregation.dimensions.concat( aggregation.timeDimensions.map(d => `${d.dimension}${d.granularity.substring(0, 1)}`) ).map(s => { const path = s.split('.'); return `${path[0][0]}${path[1]}`; }).map(s => s.replace(/_/g, '')).join('_') .replace(/[.]/g, '') .toLowerCase(); }
keyword.split(/\s+/g).slice(0, 3).forEach(function(key) { if (/^(c|s):(\S*)$/i.test(key)) { k[RegExp.$1.toLowerCase()] = RegExp.$2; } else { k['k' + i++] = key; } });
/** * Transform the internal typescript kind identifier into a human readable version. * * @param kind The original typescript kind identifier. * @returns A human readable version of the given typescript kind identifier. */ private static getKindString(kind: ReflectionKind): string { let str = ReflectionKind[kind]; str = str.replace(/(.)([A-Z])/g, (m, a, b) => a + ' ' + b.toLowerCase()); return str; }
// Fix IE bugs, see support tests function fixInput( src, dest ) { var nodeName = dest.nodeName.toLowerCase(); // Fails to persist the checked state of a cloned checkbox or radio button. if ( nodeName === "input" && rcheckableType.test( src.type ) ) { dest.checked = src.checked; // Fails to return the selected option to the default selected state when cloning options } else if ( nodeName === "input" || nodeName === "textarea" ) { dest.defaultValue = src.defaultValue; } }
timeColumnIndex(column) { const name = column.name.toLowerCase(); if (name.indexOf('create') !== -1) { return 0; } else if (name.indexOf('update') !== -1) { return 1; } else { return 2; } }
normalize(text) { return text .normalize('NFD') .replace(/[\u0300-\u036f]/g, '') .toLowerCase(); }
/** @return {string} */ humanize() { return this.name // insert a space before all caps .replace(/([A-Z])/g, ' $1') // _ chars to spaces .replace('_', ' ') // uppercase the first character .replace(/^(.)|\s(.)/g, $1 => $1.toLowerCase()); }
normalize(text) { return text .normalize('NFD') .replace(/[\u0300-\u036f]/g, '') .toLowerCase(); }
normalize(text) { return text .normalize('NFD') .replace(/[\u0300-\u036f]/g, '') .toLowerCase(); }
normalize(text) { return text .normalize('NFD') .replace(/[\u0300-\u036f]/g, '') .toLowerCase(); }