100+ results results for 'trim toLowerCase' (429 ms)
63 } 64 elem.className = jQuery.trim( cur ); 65 102 } 103 elem.className = value ? jQuery.trim( cur ) : ""; 104 } 170 if ( elem ) { 171 hooks = jQuery.valHooks[ elem.type ] || jQuery.valHooks[ elem.nodeName.toLowerCase() ]; 172 215 216 hooks = jQuery.valHooks[ this.type ] || jQuery.valHooks[ this.nodeName.toLowerCase() ]; 217 307 if ( notxml ) { 308 name = name.toLowerCase(); 309 hooks = jQuery.attrHooks[ name ] || ( rboolean.test( name ) ? boolHook : nodeHook );createorg.js https://gitlab.com/vaibspidy/gkwebapp | JavaScript | 408 lines
133 String.prototype.toProperCase = function () { 134 return this.replace(/\w\S*/g, function(txt){return txt.charAt(0).toUpperCase() + txt.substr(1).toLowerCase();}); 135}; 149 { 150 oname = forname.toLowerCase(); 151 $("#orgname").val(oname); 243 var enddate = endday+endmonth+endyear; 244 if ($.trim($("#orgname").val())=="") { 245 $("#orgname-blank-alert").alert(); 313 314 if ($.trim($("#fromday").val())==""||$.trim($("#frommonth").val())==""||$.trim($("#fromyear").val())==""||$.trim($("#today").val())==""||$.trim($("#tomonth").val())==""||$.trim($("#toyear").val())=="") { 315 $("#date-blank-alert").alert();TableReportGenerator.java https://gitlab.com/essere.lab.public/qualitas.class-corpus | Java | 304 lines
78 79 if(selected || reportName == null || reportName.trim().length() == 0) 80 { 86 87 boolean select = reportName != null && reportName.trim().length() > 0; 88 if(select) 164 StatisticalItem item = (StatisticalItem) items.next(); 165 String sql = item.getValue().toLowerCase(); 166 225 226 table = table.substring(0, tableEnd).trim(); 227 TableStats tableStats = (TableStats) tables.get(table);WString.cpp https://gitlab.com/vapkse/arduino | C++ | 645 lines
606 607void String::toLowerCase(void) 608{ 622 623void String::trim(void) 624{EssentialsSign.java https://github.com/BodyshotzVG/Essentials.git | Java | 489 lines
32 final User user = ess.getUser(event.getPlayer()); 33 if (!(user.isAuthorized("essentials.signs." + signName.toLowerCase() + ".create") 34 || user.isAuthorized("essentials.signs.create." + signName.toLowerCase()))) 82 { 83 return (user.isAuthorized("essentials.signs." + signName.toLowerCase() + ".use") 84 || user.isAuthorized("essentials.signs.use." + signName.toLowerCase())) 104 { 105 return (user.isAuthorized("essentials.signs." + signName.toLowerCase() + ".break") 106 || user.isAuthorized("essentials.signs.break." + signName.toLowerCase())) 256 { 257 final String line = sign.getLine(index).trim(); 258 if (line.isEmpty()) 275 sign.setLine(amountIndex, Integer.toString(item.getAmount())); 276 sign.setLine(itemIndex, sign.getLine(itemIndex).trim()); 277 }Room.java https://bitbucket.org/teamchromide/habbo-4-java.git | Java | 151 lines
107 for (int x = 0; x < m.getLimitX(); x++) { 108 String sq = lines[y].substring(x, x + 1).trim().toLowerCase(); 109DAOParamUtil.java https://github.com/lululiferay/liferay-portal.git | Java | 239 lines
123 public static String getLike( 124 HttpServletRequest request, String param, boolean toLowerCase) { 125 125 126 return getLike(request, param, null, toLowerCase); 127 } 136 HttpServletRequest request, String param, String defaultValue, 137 boolean toLowerCase) { 138 141 if (value != null) { 142 value = value.trim(); 143 143 144 if (toLowerCase) { 145 value = value.toLowerCase();settings-views-html-settings-tax.js https://gitlab.com/hunt9310/ras | JavaScript | 413 lines
8 9 if ( ! String.prototype.trim ) { 10 String.prototype.trim = function () { 51 var rates = this.get( 'rates' ), 52 search = $search_field.val().toLowerCase(); 53 55 rates = _.filter( rates, function( rate ) { 56 var search_text = _.toArray( rate ).join( ' ' ).toLowerCase(); 57 return ( -1 !== search_text.indexOf( search ) ); 352 val = $.map( val, function( thing ) { 353 return thing.trim(); 354 });api.js https://github.com/taxilian/mongoose.git | JavaScript | 218 lines
169 if (typeof ctx.constructor === 'string') { 170 ctx.anchorId = `${ctx.constructor.toLowerCase()}_${ctx.constructor}-${ctx.name}`; 171 } else if (typeof ctx.receiver === 'string') { 171 } else if (typeof ctx.receiver === 'string') { 172 ctx.anchorId = `${ctx.receiver.toLowerCase()}_${ctx.receiver}.${ctx.name}`; 173 } else { 173 } else { 174 ctx.anchorId = `${ctx.name.toLowerCase()}_${ctx.name}`; 175 } 215 216 return $1 + hl.highlight(code[2], { language: code[1] }).value.trim() + $3; 217 });pollResult.jsp https://bitbucket.org/NightFury_37/poll.git | JavaServer Pages | 141 lines
26 int usersSize = choice.getNumberOfUsers(); 27 if (action.trim().toLowerCase().equals(choice.toString().trim().toLowerCase())) { 28 choice.addUserVote(new User(request.getParameter("voterName")));common.js https://github.com/Subv/Armory.git | JavaScript | 455 lines
1var Browser = { 2 a : navigator.userAgent.toLowerCase() 3} 17} 18String.prototype.trim = function() { 19 return this.replace(/^\s+|\s+$/g, ''); 75 for(var i = 0; i < e.childNodes.length; i++) 76 if(e.childNodes[i].nodeName.toLowerCase() == tagName) 77 nodes.push(e.childNodes[i]); 100 var e = $(e); 101 e.className = e.className.replace(new RegExp('(^|\\s+)' + className + '(\\s+|$)'), ' ').trim(); 102} 292 getForm : function(node) { 293 while(node.nodeName.toLowerCase() != 'form') 294 node = node.parentNode;Format.js https://gitlab.com/rsilveira1987/Expresso | JavaScript | 355 lines
12Ext.util.Format = function(){ 13 var trimRe = /^\s+|\s+$/g, 14 stripTagsRE = /<\/?[^>]+>/gi, 80 /** 81 * Trims any whitespace from either side of a string 82 * @param {String} value The text to trim 82 * @param {String} value The text to trim 83 * @return {String} The trimmed text 84 */ 84 */ 85 trim : function(value){ 86 return String(value).replace(trimRe, ""); 105 lowercase : function(value){ 106 return String(value).toLowerCase(); 107 },tmpl.js https://github.com/winhamwr/khan-exercises.git | JavaScript | 573 lines
203 // Make sure any HTML formatting is stripped 204 code = jQuery.trim( jQuery.tmpl.cleanHTML( code ) ); 205 229 if ( elem.nodeName ) { 230 info = elem.nodeName.toLowerCase(); 231 420 // Look up the processor based on the tag name 421 var type = elem.nodeName.toLowerCase(); 422 if ( jQuery.tmpl.type[ type ] != null ) {answer-types.js https://github.com/winhamwr/khan-exercises.git | JavaScript | 699 lines
18 verifier = function( correct, guess ) { 19 correct = jQuery.trim( correct ); 20 guess = jQuery.trim( guess ); 38 }; 39 ret.solution = jQuery.trim( correct ); 40 ret.examples = verifier.examples || []; 233 transformer: function( text ) { 234 text = jQuery.trim( text ); 235 var hasPercentSign = false; 237 if ( text.indexOf( "%" ) === ( text.length - 1 ) ) { 238 text = jQuery.trim( text.substring( 0, text.length - 1) ); 239 hasPercentSign = true; 342 if ( typeof val === "string" && 343 correct.toLowerCase() === val.toLowerCase() ) { 344 ret = true;mootools-1.3.1.js https://github.com/quarkness/piwik.git | JavaScript | 2026 lines
159 if (name){ 160 var lower = name.toLowerCase(); 161 var typeCheck = function(item){ 267 'charAt', 'charCodeAt', 'concat', 'indexOf', 'lastIndexOf', 'match', 'quote', 'replace', 'search', 268 'slice', 'split', 'substr', 'substring', 'toLowerCase', 'toUpperCase' 269])('Array', Array, [ 599 600 trim: function(){ 601 return this.replace(/^\s+|\s+$/g, ''); 604 clean: function(){ 605 return this.replace(/\s+/g, ' ').trim(); 606 }, 615 return this.replace(/[A-Z]/g, function(match){ 616 return ('-' + match.charAt(0).toLowerCase()); 617 });mootools-1.2.5.js https://github.com/quarkness/piwik.git | JavaScript | 2092 lines
45 if (name){ 46 var family = name.toLowerCase(); 47 object.prototype.$family = {name: family}; 103 'Array': ["concat", "indexOf", "join", "lastIndexOf", "pop", "push", "reverse", "shift", "slice", "sort", "splice", "toString", "unshift", "valueOf"], 104 'String': ["charAt", "charCodeAt", "concat", "indexOf", "lastIndexOf", "match", "replace", "search", "slice", "split", "substr", "substring", "toLowerCase", "toUpperCase", "valueOf"] 105 }; 469 470 trim: function(){ 471 return this.replace(/^\s+|\s+$/g, ''); 474 clean: function(){ 475 return this.replace(/\s+/g, ' ').trim(); 476 }, 485 return this.replace(/[A-Z]/g, function(match){ 486 return ('-' + match.charAt(0).toLowerCase()); 487 });vakata.js https://github.com/CNDLS/jstree.git | JavaScript | 1526 lines
88 $.each(node.attributes, function (i, v) { 89 if($.inArray(v.nodeName.toLowerCase(),['style','contenteditable','hasfocus','tabindex']) !== -1) { return; } 90 if(v.nodeValue !== null && $.trim(v.nodeValue) !== '') { 126 get_css : function(rule_name, delete_flag, sheet) { 127 rule_name = rule_name.toLowerCase(); 128 var css_rules = sheet.cssRules || sheet.rules, 131 if(css_rules.length && j > css_rules.length + 5) { return false; } 132 if(css_rules[j].selectorText && css_rules[j].selectorText.toLowerCase() == rule_name) { 133 if(delete_flag === true) {page.php https://github.com/cgajardo/repositorium.git | PHP | 983 lines
46 'frame' => 'SimpleFrameTag'); 47 $attributes = $this->_keysToLowerCase($attributes); 48 if (array_key_exists($name, $map)) { 81 } 82 $type = strtolower(trim($attributes['type'])); 83 $map = array( 104 */ 105 function _keysToLowerCase($map) { 106 $lower = array();knockout-2.1.0.debug.js https://bitbucket.org/sameh_mis/saeemtest.git | JavaScript | 1138 lines
42ko.utils = new (function () { 43 var stringTrimRegex = /^(\s|\u00A0)+|(\s|\u00A0)+$/g; 44 74 if ((ko.utils.tagNameLower(element) !== "input") || !element.type) return false; 75 if (eventType.toLowerCase() != "click") return false; 76 var inputType = element.type; 204 205 stringTrim: function (string) { 206 return (string || "").replace(stringTrimRegex, ""); 212 for (var i = 0, j = tokens.length; i < j; i++) { 213 var trimmed = ko.utils.stringTrim(tokens[i]); 214 if (trimmed !== "") 214 if (trimmed !== "") 215 result.push(trimmed); 216 }mootools-core-uncompressed.js https://bitbucket.org/pastor399/newcastleunifc.git | JavaScript | 2006 lines
166 if (name){ 167 var lower = name.toLowerCase(); 168 var typeCheck = function(item){ 278 'charAt', 'charCodeAt', 'concat', 'indexOf', 'lastIndexOf', 'match', 'quote', 'replace', 'search', 279 'slice', 'split', 'substr', 'substring', 'trim', 'toLowerCase', 'toUpperCase' 280])('Array', Array, [ 613 614 trim: function(){ 615 return String(this).replace(/^\s+|\s+$/g, ''); 618 clean: function(){ 619 return String(this).replace(/\s+/g, ' ').trim(); 620 }, 629 return String(this).replace(/[A-Z]/g, function(match){ 630 return ('-' + match.charAt(0).toLowerCase()); 631 });textboxlist.js https://bitbucket.org/pastor399/newcastleunifc.git | JavaScript | 815 lines
81 82 title: item.data("title") || $.trim(itemContent.text()), 83 104 105 return (self.options.caseSensitive) ? title : title.toLowerCase(); 106 }, 185 // Remove from itemsByTitle object 186 var key = (self.options.caseSensitive) ? item.title : item.title.toLowerCase(); 187 delete self.itemsByTitle[key]; 280 281 var item = $.trim(self.textField().val()); 282 312 { 313 var item = $.trim(self.textField().val()); 314autocompleter.js https://bitbucket.org/pastor399/newcastleunifc.git | JavaScript | 505 lines
76 separatorSplit: /\s*[,;]\s*/, 77 autoTrim: false, 78 allowDupes: false, 170 end = input.length; 171 if (input.substr(0, start).toLowerCase() != this.queryValue.toLowerCase()) start = 0; 172 if (this.options.multiple) { 244 if (this.options.forceSelect) value = this.opted; 245 if (this.options.autoTrim) { 246 value = value.split(this.options.separatorSplit).filter($arguments(0)).join(this.options.separator);eblog.js https://bitbucket.org/pastor399/newcastleunifc.git | JavaScript | 1756 lines
72 73 if (/jpg|png|gif|xcf|odg|bmp|jpeg/.test(parts[0].toLowerCase())) { 74 parts.splice(0, 1); 137 var _prop = prop.split(":"); 138 css[$.trim(_prop[0])] = $.trim(_prop[1]); 139 });jquery.jeditable.js https://bitbucket.org/mkirby91/tritontime.git | JavaScript | 543 lines
120 /* if element is empty add something clickable (if requested) */ 121 if (!$.trim($(this).html())) { 122 $(this).html(settings.placeholder); 169 /* remove placeholder text, replace is here because of IE */ 170 if ($(this).html().toLowerCase().replace(/(;|")/g, '') == 171 settings.placeholder.toLowerCase().replace(/(;|")/g, '')) { 318 /* TODO: this is not dry */ 319 if (!$.trim($(self).html())) { 320 $(self).html(settings.placeholder);dom-base.js https://bitbucket.org/kudutest1/moodlegit.git | JavaScript | 685 lines
109 if (node && node[TAG_NAME]) { 110 getter = Y_DOM.VALUE_GETTERS[node[TAG_NAME].toLowerCase()]; 111 131 if (node && node[TAG_NAME]) { 132 setter = Y_DOM.VALUE_SETTERS[node[TAG_NAME].toLowerCase()]; 133 232 if (!Y.DOM.hasClass(node, className)) { // skip if already present 233 node.className = Y.Lang.trim([node.className, className].join(' ')); 234 } 245 if (className && hasClass(node, className)) { 246 node.className = Y.Lang.trim(node.className.replace(Y.DOM._getRegExp('(?:^|\\s+)' + 247 className + '(?:\\s+|$)'), ' ')); 376 if (typeof html === 'string') { 377 html = Y.Lang.trim(html); // match IE which trims whitespace from innerHTML 378jquery.autocomplete.js https://bitbucket.org/kudutest1/moodlegit.git | JavaScript | 759 lines
133 // matches also semicolon 134 case options.multiple && $.trim(options.multipleSeparator) == "," && KEY.COMMA: 135 case KEY.TAB: 174 for (var i=0; i < data.length; i++) { 175 if( data[i].result.toLowerCase() == q.toLowerCase() ) { 176 result = data[i]; 209 if ( options.multiple ) { 210 var words = trimWords($input.val()); 211 if ( words.length > 1 ) { 239 if (!options.matchCase) 240 currentValue = currentValue.toLowerCase(); 241 request(currentValue, receiveData, hideResultsNow); 273 // if the last user key pressed was backspace, don't autofill 274 if( options.autoFill && (lastWord($input.val()).toLowerCase() == q.toLowerCase()) && lastKeyPressCode != KEY.BACKSPACE ) { 275 // fill in the value (keep the case the user has typed)mootools.js https://bitbucket.org/kudutest2/kenticogit.git | JavaScript | 1790 lines
47 if (name) { 48 var family = name.toLowerCase(); 49 object.prototype.$family = { name: family }; 105 'Array': ["concat", "indexOf", "join", "lastIndexOf", "pop", "push", "reverse", "shift", "slice", "sort", "splice", "toString", "unshift", "valueOf"], 106 'String': ["charAt", "charCodeAt", "concat", "indexOf", "lastIndexOf", "match", "replace", "search", "slice", "split", "substr", "substring", "toLowerCase", "toUpperCase", "valueOf"] 107 }; 471 472 trim: function() { 473 return this.replace(/^\s+|\s+$/g, ''); 476 clean: function() { 477 return this.replace(/\s+/g, ' ').trim(); 478 }, 487 return this.replace(/[A-Z]/g, function(match) { 488 return ('-' + match.charAt(0).toLowerCase()); 489 });editor_plugin_src.js https://github.com/ivebeenlinuxed/Boiler.git | JavaScript | 537 lines
284 // Found IMG/INPUT etc 285 if (nonEmptyElements[node.nodeName.toLowerCase()]) { 286 break; 289 // Found text node with contents 290 if (node.nodeType === 3 && tinymce.trim(node.nodeValue).length > 0) { 291 break; 435 function convertRegExpsToNonEditable(ed, args) { 436 var i = nonEditableRegExps.length, content = args.content, cls = tinymce.trim(nonEditClass); 437 458 459 editClass = " " + tinymce.trim(ed.getParam("noneditable_editable_class", "mceEditable")) + " "; 460 nonEditClass = " " + tinymce.trim(ed.getParam("noneditable_noneditable_class", "mceNonEditable")) + " ";AbstractSaml20ObjectBuilder.java https://github.com/frett/cas.git | Java | 492 lines
68 69 val compareFormat = nameFormat.trim().toLowerCase(); 70 if ("basic".equals(compareFormat) || compareFormat.equals(Attribute.BASIC)) {angular.js https://gitlab.com/jcai3/fount-FE | JavaScript | 1690 lines
121 isPromiseLike: true, 122 trim: true, 123 escapeForRegexp: true, 200 */ 201var lowercase = function(string) {return isString(string) ? string.toLowerCase() : string;}; 202var hasOwnProperty = Object.prototype.hasOwnProperty; 230 231// String#toLowerCase and String#toUpperCase don't produce correct results in browsers with Turkish 232// locale, for this reason we need to detect this case and redefine lowercase/uppercase methods 233// with correct but slower alternatives. 234if ('i' !== 'I'.toLowerCase()) { 235 lowercase = manualLowercase;jquery-migrate.js https://gitlab.com/Gashler/dp | JavaScript | 521 lines
97jQuery.attr = function( elem, name, value, pass ) { 98 var lowerName = name.toLowerCase(), 99 nType = elem && elem.nodeType; 129 130 name.toLowerCase() : 131 undefined; 146 147 elem.setAttribute( name, name.toLowerCase() ); 148 } 164 get: function( elem, name ) { 165 var nodeName = ( elem.nodeName || "" ).toLowerCase(); 166 if ( nodeName === "button" ) { 176 set: function( elem, value ) { 177 var nodeName = ( elem.nodeName || "" ).toLowerCase(); 178 if ( nodeName === "button" ) {jquery.ui-effects.js https://gitlab.com/Gashler/dp | JavaScript | 241 lines
31jQuery.effects||function(f,j){function l(c){var a;if(c&&c.constructor==Array&&c.length==3)return c;if(a=/rgb\(\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*\)/.exec(c))return[parseInt(a[1],10),parseInt(a[2],10),parseInt(a[3],10)];if(a=/rgb\(\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*\)/.exec(c))return[parseFloat(a[1])*2.55,parseFloat(a[2])*2.55,parseFloat(a[3])*2.55];if(a=/#([a-fA-F0-9]{2})([a-fA-F0-9]{2})([a-fA-F0-9]{2})/.exec(c))return[parseInt(a[1], 3216),parseInt(a[2],16),parseInt(a[3],16)];if(a=/#([a-fA-F0-9])([a-fA-F0-9])([a-fA-F0-9])/.exec(c))return[parseInt(a[1]+a[1],16),parseInt(a[2]+a[2],16),parseInt(a[3]+a[3],16)];if(/rgba\(0, 0, 0, 0\)/.exec(c))return m.transparent;return m[f.trim(c).toLowerCase()]}function r(c,a){var b;do{b=f.curCSS(c,a);if(b!=""&&b!="transparent"||f.nodeName(c,"body"))break;a="backgroundColor"}while(c=c.parentNode);return l(b)}function n(){var c=document.defaultView?document.defaultView.getComputedStyle(this,null):this.currentStyle, 33a={},b,d;if(c&&c.length&&c[0]&&c[c[0]])for(var e=c.length;e--;){b=c[e];if(typeof c[b]=="string"){d=b.replace(/\-(\w)/g,function(g,h){return h.toUpperCase()});a[d]=c[b]}}else for(b in c)if(typeof c[b]==="string")a[b]=c[b];return a}function o(c){var a,b;for(a in c){b=c[a];if(b==null||f.isFunction(b)||a in s||/scrollbar/.test(a)||!/color/i.test(a)&&isNaN(parseFloat(b)))delete c[a]}return c}function t(c,a){var b={_:0},d;for(d in a)if(c[d]!=a[d])b[d]=a[d];return b}function k(c,a,b,d){if(typeof c=="object"){d=angular.js https://gitlab.com/bahtou/started | JavaScript | 1682 lines
124 isPromiseLike: true, 125 trim: true, 126 escapeForRegexp: true, 196 197var lowercase = function(string) {return isString(string) ? string.toLowerCase() : string;}; 198var uppercase = function(string) {return isString(string) ? string.toUpperCase() : string;}; 214 215// String#toLowerCase and String#toUpperCase don't produce correct results in browsers with Turkish 216// locale, for this reason we need to detect this case and redefine lowercase/uppercase methods 217// with correct but slower alternatives. See https://github.com/angular/angular.js/issues/11387 218if ('i' !== 'I'.toLowerCase()) { 219 lowercase = manualLowercase;functionsha.js https://gitlab.com/macitsimsek/fastsubtitle | JavaScript | 603 lines
33 if(informations.Name.indexOf('(')!=-1)informations.Name=informations.Name.substr(0,informations.Name.indexOf("(")).trim(); 34 var durat=$(donenVeri).find('.article div:contains("Runtime:")').text().trim().replace("Runtime:","").replace("min","").split('|')[0].trim(); 35 while(durat.indexOf(" ")!=-1)durat=durat.replace(" "," "); 48 informations.Type=tip; 49 var visiondate =$(donenVeri).find('a[title^="See more release dates"]').text().replace("(","").toLowerCase().replace("tv series","").replace("tv movies","").replace(")","").split("-")[0].split("–")[0].trim().split(' '); 50 informations.VisionDate=(visiondate.length>2)?visiondate[2]:visiondate[0]; 68 informations.Picture=$(donenVeri).find('div[class^="poster"] a img').attr('src'); 69 informations.TurkishName=$(donenVeri).find('.article div:contains("Also Known As")').text().trim().replace("Also Known As:","").replace("See more","").replace('»',"").trim(); 70 abstract(informations.Name,tip); 240 "rol":"", 241 "content":$(this).find('textarea').text().trim(), 242 "personPicture":$(this).find('a img').attr('src').trim() 264 finishVideo.Abstract=$("#abstract").val().trim(); 265 finishVideo.Type=$('.selectpicker').val().trim(); 266 $.ajax({jquery.jeditable.js https://gitlab.com/heruujoko/dynaform | JavaScript | 543 lines
120 /* if element is empty add something clickable (if requested) */ 121 if (!$.trim($(this).html())) { 122 $(this).html(settings.placeholder); 169 /* remove placeholder text, replace is here because of IE */ 170 if ($(this).html().toLowerCase().replace(/(;|")/g, '') == 171 settings.placeholder.toLowerCase().replace(/(;|")/g, '')) { 318 /* TODO: this is not dry */ 319 if (!$.trim($(self).html())) { 320 $(self).html(settings.placeholder);jquery.flot.js https://gitlab.com/heruujoko/dynaform | JavaScript | 1278 lines
31 */ 32(function($){$.color={};$.color.make=function(r,g,b,a){var o={};o.r=r||0;o.g=g||0;o.b=b||0;o.a=a!=null?a:1;o.add=function(c,d){for(var i=0;i<c.length;++i)o[c.charAt(i)]+=d;return o.normalize()};o.scale=function(c,f){for(var i=0;i<c.length;++i)o[c.charAt(i)]*=f;return o.normalize()};o.toString=function(){if(o.a>=1){return"rgb("+[o.r,o.g,o.b].join(",")+")"}else{return"rgba("+[o.r,o.g,o.b,o.a].join(",")+")"}};o.normalize=function(){function clamp(min,value,max){return value<min?min:value>max?max:value}o.r=clamp(0,parseInt(o.r),255);o.g=clamp(0,parseInt(o.g),255);o.b=clamp(0,parseInt(o.b),255);o.a=clamp(0,o.a,1);return o};o.clone=function(){return $.color.make(o.r,o.b,o.g,o.a)};return o.normalize()};$.color.extract=function(elem,css){var c;do{c=elem.css(css).toLowerCase();if(c!=""&&c!="transparent")break;elem=elem.parent()}while(elem.length&&!$.nodeName(elem.get(0),"body"));if(c=="rgba(0, 0, 0, 0)")c="transparent";return $.color.parse(c)};$.color.parse=function(str){var res,m=$.color.make;if(res=/rgb\(\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*\)/.exec(str))return m(parseInt(res[1],10),parseInt(res[2],10),parseInt(res[3],10));if(res=/rgba\(\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*,\s*([0-9]+(?:\.[0-9]+)?)\s*\)/.exec(str))return m(parseInt(res[1],10),parseInt(res[2],10),parseInt(res[3],10),parseFloat(res[4]));if(res=/rgb\(\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*\)/.exec(str))return m(parseFloat(res[1])*2.55,parseFloat(res[2])*2.55,parseFloat(res[3])*2.55);if(res=/rgba\(\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\s*\)/.exec(str))return m(parseFloat(res[1])*2.55,parseFloat(res[2])*2.55,parseFloat(res[3])*2.55,parseFloat(res[4]));if(res=/#([a-fA-F0-9]{2})([a-fA-F0-9]{2})([a-fA-F0-9]{2})/.exec(str))return m(parseInt(res[1],16),parseInt(res[2],16),parseInt(res[3],16));if(res=/#([a-fA-F0-9])([a-fA-F0-9])([a-fA-F0-9])/.exec(str))return m(parseInt(res[1]+res[1],16),parseInt(res[2]+res[2],16),parseInt(res[3]+res[3],16));var name=$.trim(str).toLowerCase();if(name=="transparent")return m(255,255,255,0);else{res=lookupColors[name]||[0,0,0];return m(res[0],res[1],res[2])}};var lookupColors={aqua:[0,255,255],azure:[240,255,255],beige:[245,245,220],black:[0,0,0],blue:[0,0,255],brown:[165,42,42],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgrey:[169,169,169],darkgreen:[0,100,0],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkviolet:[148,0,211],fuchsia:[255,0,255],gold:[255,215,0],green:[0,128,0],indigo:[75,0,130],khaki:[240,230,140],lightblue:[173,216,230],lightcyan:[224,255,255],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightyellow:[255,255,224],lime:[0,255,0],magenta:[255,0,255],maroon:[128,0,0],navy:[0,0,128],olive:[128,128,0],orange:[255,165,0],pink:[255,192,203],purple:[128,0,128],violet:[128,0,128],red:[255,0,0],silver:[192,192,192],white:[255,255,255],yellow:[255,255,0]}})(jQuery); 33bootstrap-colorpicker.js https://gitlab.com/betanurlaila/UI_onlineshop | JavaScript | 1079 lines
37 if (val) { 38 if (val.toLowerCase !== undefined) { 39 // cast to string 200 } 201 if (val.toLowerCase !== undefined) { 202 return parseFloat(val); 209 } 210 strVal = strVal.toLowerCase().trim(); 211 return (strVal === 'transparent') || (strVal.match(/#?00000000/)) || (strVal.match(/(rgba|hsla)\(0,0,0,0?\.?0\)/)); 217 setColor: function(strVal) { 218 strVal = strVal.toLowerCase().trim(); 219 if (strVal) { 237 stringToHSB: function(strVal) { 238 strVal = strVal.toLowerCase(); 239 var alias;ArrayUtils.cls https://gitlab.com/Aaeinstein54/linguist | Visual Basic for Applications | 458 lines
71 for(String str : strs){ 72 returnValue.add(str == null ? null : str.toLowerCase()); 73 } 91 92 global static List<String> trim(List<String> strs){ 93 List<String> returnValue = null; 97 for(String str : strs){ 98 returnValue.add(str == null ? null : str.trim()); 99 } 150 global static Object[] pluck(SObject[] objectArray, String fieldName){ 151 if(isEmpty(objectArray) || fieldName == null || fieldName.trim() == null || fieldName.trim().length() == 0){ 152 return new Object[]{};loop-protect.js https://gitlab.com/Aaeinstein54/FreeCodeCamp | JavaScript | 437 lines
108 theRest.replace(reSingle, function commentStripper(match, capture, i) { 109 var target = theRest.substr(0, i).replace(comments, '').trim(); 110 DEBUG && debug('- directlyBeforeLoop: ' + target); // jshint ignore:line 153 154 if (line.toLowerCase().indexOf('noprotect') !== -1) { 155 disableLoopProtection = true;jquery.autocomplete.js https://gitlab.com/Aaeinstein54/corelib | JavaScript | 762 lines
174 for (var i=0; i < data.length; i++) { 175 if( data[i].result.toLowerCase() == q.toLowerCase() ) { 176 result = data[i]; 239 if (!options.matchCase) 240 currentValue = currentValue.toLowerCase(); 241 request(currentValue, receiveData, hideResultsNow); 263 return value; 264 var words = trimWords(value); 265 return words[words.length - 1]; 273 // if the last user key pressed was backspace, don't autofill 274 if( options.autoFill && (lastWord($input.val()).toLowerCase() == q.toLowerCase()) && lastKeyPressCode != KEY.BACKSPACE ) { 275 // fill in the value (keep the case the user has typed) 424 if (options.matchContains == "word"){ 425 i = s.toLowerCase().search("\\b" + sub.toLowerCase()); 426 }attributes.js https://gitlab.com/jeichert/essential-js-design-patterns | JavaScript | 659 lines
65 } 66 elem.className = jQuery.trim( cur ); 67 104 } 105 elem.className = value ? jQuery.trim( cur ) : ""; 106 } 177 if ( elem ) { 178 hooks = jQuery.valHooks[ elem.type ] || jQuery.valHooks[ elem.nodeName.toLowerCase() ]; 179 221 222 hooks = jQuery.valHooks[ this.type ] || jQuery.valHooks[ this.nodeName.toLowerCase() ]; 223 319 if ( nType !== 1 || !jQuery.isXMLDoc( elem ) ) { 320 name = name.toLowerCase(); 321 hooks = jQuery.attrHooks[ name ] ||ajax.js https://gitlab.com/jeichert/essential-js-design-patterns | JavaScript | 855 lines
53// Segment location into parts 54ajaxLocParts = rurl.exec( ajaxLocation.toLowerCase() ) || []; 55 68 i = 0, 69 dataTypes = dataTypeExpression.toLowerCase().match( core_rnotwhite ) || []; 70 347 while ( (match = rheaders.exec( responseHeadersString )) ) { 348 responseHeaders[ match[1].toLowerCase() ] = match[ 2 ]; 349 } 350 } 351 match = responseHeaders[ key.toLowerCase() ]; 352 } 421 // Extract dataTypes list 422 s.dataTypes = jQuery.trim( s.dataType || "*" ).toLowerCase().match( core_rnotwhite ) || [""]; 423ConfigParser.js https://gitlab.com/boxnia/NFU_MOVIL | JavaScript | 499 lines
46function getNodeTextSafe(el) { 47 return el && el.text && el.text.trim(); 48} 83 var value = elems.filter(function (elem) { 84 return elem.attrib.name.toLowerCase() === attributeName.toLowerCase(); 85 }).map(function (filteredElems) { 270 function filterScriptByHookType(el) { 271 return el.attrib.src && el.attrib.type && el.attrib.type.toLowerCase() === hook; 272 }nopt.js https://gitlab.com/boxnia/NFU_MOVIL | JavaScript | 552 lines
70 debug("string %j", val) 71 val = val.trim() 72 if ((val === "null" && ~type.indexOf(null)) 258 var no = false 259 while (arg.toLowerCase().indexOf("no-") === 0) { 260 no = !nozepto.js https://gitlab.com/Mirros/jsdelivr | JavaScript | 1355 lines
2;(function(undefined){ 3 if (String.prototype.trim === undefined) // fix for iOS 3.2 4 String.prototype.trim = function(){ return this.replace(/^\s+/, '').replace(/\s+$/, '') } 97 .replace(/_/g, '-') 98 .toLowerCase() 99 } 180 else if (fragmentRE.test(selector)) 181 dom = zepto.fragment(selector.trim(), RegExp.$1), selector = null 182 // If there's a context, create a collection on that context first, and select 242 243 $.trim = function(str) { return str.trim() } 244zepto.js https://gitlab.com/Mirros/jsdelivr | JavaScript | 1399 lines
4;(function(undefined){ 5 if (String.prototype.trim === undefined) // fix for iOS 3.2 6 String.prototype.trim = function(){ return this.replace(/^\s+|\s+$/g, '') } 104 .replace(/_/g, '-') 105 .toLowerCase() 106 } 198 else if (fragmentRE.test(selector)) 199 dom = zepto.fragment(selector.trim(), RegExp.$1, context), selector = null 200 // If there's a context, create a collection on that context first, and select 321 $.camelCase = camelize 322 $.trim = function(str) { return str.trim() } 323 364 $.each("Boolean Number String Function Array Date RegExp Object Error".split(" "), function(i, name) { 365 class2type[ "[object " + name + "]" ] = name.toLowerCase() 366 })dom-base.js https://gitlab.com/Mirros/jsdelivr | JavaScript | 702 lines
116 if (node && node[TAG_NAME]) { 117 getter = Y_DOM.VALUE_GETTERS[node[TAG_NAME].toLowerCase()]; 118 138 if (node && node[TAG_NAME]) { 139 setter = Y_DOM.VALUE_SETTERS[node[TAG_NAME].toLowerCase()]; 140 val = (val === null) ? '' : val; 239 if (!Y.DOM.hasClass(node, className)) { // skip if already present 240 node.className = Y.Lang.trim([node.className, className].join(' ')); 241 } 252 if (className && hasClass(node, className)) { 253 node.className = Y.Lang.trim(node.className.replace(Y.DOM._getRegExp('(?:^|\\s+)' + 254 className + '(?:\\s+|$)'), ' ')); 385 if (typeof html === 'string') { 386 html = Y.Lang.trim(html); // match IE which trims whitespace from innerHTML 387w2ui.js https://gitlab.com/Mirros/jsdelivr | JavaScript | 1303 lines
112 // format date 113 var tmp = val.replace(/-/g, '/').replace(/\./g, '/').toLowerCase().split('/'); 114 var tmp2 = format.replace(/-/g, '/').replace(/\./g, '/').toLowerCase(); 147 if (val.indexOf('PM') >= 0 || val.indexOf('AM') >= 0) max = 12; else max = 23; 148 val = $.trim(val.replace('AM', '')); 149 val = $.trim(val.replace('PM', '')); 262 var date = dt.getDate(); 263 return format.toLowerCase() 264 .replace('month', w2utils.settings.fullmonths[month]) 297 } 298 return format.toLowerCase() 299 .replace('am', type) 326 case 'string': 327 html = $.trim(String(html).replace(/(<([^>]+)>)/ig, "")); 328 break;w2ui.js https://gitlab.com/Mirros/jsdelivr | JavaScript | 1394 lines
89 // European format dd/mm/yyyy 90 if (format.toLowerCase() == 'dd/mm/yyyy' || format.toLowerCase() == 'dd-mm-yyyy' || format.toLowerCase() == 'dd.mm.yyyy') { 91 val = val.replace(/-/g, '/').replace(/\./g, '/'); 117 if (val.indexOf('PM') >= 0 || val.indexOf('AM') >= 0) max = 12; else max = 23; 118 val = $.trim(val.replace('AM', '')); 119 val = $.trim(val.replace('PM', '')); 144 var date = dt.getDate(); 145 var res = format.toLowerCase() 146 .replace('yyyy', year) 236 case 'string': 237 html = $.trim(String(html).replace(/(<([^>]+)>)/ig, "")); 238 break;vue.js https://gitlab.com/Mirros/jsdelivr | JavaScript | 2114 lines
182 function hyphenate(str) { 183 return str.replace(hyphenateRE, '$1-$2').toLowerCase(); 184 } 394 395 var isIE9 = inBrowser && navigator.userAgent.toLowerCase().indexOf('msie 9.0') > 0; 396 396 397 var isAndroid = inBrowser && navigator.userAgent.toLowerCase().indexOf('android') > 0; 398 579 function pushFilter() { 580 var exp = str.slice(lastFilterIndex, i).trim(); 581 var filter; 663 lastFilterIndex = i + 1; 664 dir.expression = str.slice(0, i).trim(); 665 } else {vue.js https://gitlab.com/Mirros/jsdelivr | JavaScript | 2092 lines
183 function hyphenate(str) { 184 return str.replace(hyphenateRE, '$1-$2').toLowerCase(); 185 } 399 // UA sniffing for working around browser-specific quirks 400 var UA = inBrowser && window.navigator.userAgent.toLowerCase(); 401 var isIE9 = UA && UA.indexOf('msie 9.0') > 0; 597 function pushFilter() { 598 var exp = str.slice(lastFilterIndex, i).trim(); 599 var filter;vue.common.js https://gitlab.com/Mirros/jsdelivr | JavaScript | 2220 lines
179function hyphenate(str) { 180 return str.replace(hyphenateRE, '$1-$2').toLowerCase(); 181} 395// UA sniffing for working around browser-specific quirks 396var UA = inBrowser && window.navigator.userAgent.toLowerCase(); 397var isIE9 = UA && UA.indexOf('msie 9.0') > 0; 593function pushFilter() { 594 var exp = str.slice(lastFilterIndex, i).trim(); 595 var filter; 677 lastFilterIndex = i + 1; 678 dir.expression = str.slice(0, i).trim(); 679 } else { 705 if (dir.expression == null) { 706 dir.expression = str.slice(0, i).trim(); 707 } else if (lastFilterIndex !== 0) {vue.js https://gitlab.com/Mirros/jsdelivr | JavaScript | 2083 lines
183 function hyphenate(str) { 184 return str.replace(hyphenateRE, '$1-$2').toLowerCase(); 185 } 397 398 var isIE9 = inBrowser && navigator.userAgent.toLowerCase().indexOf('msie 9.0') > 0; 399 399 400 var isAndroid = inBrowser && navigator.userAgent.toLowerCase().indexOf('android') > 0; 401 595 function pushFilter() { 596 var exp = str.slice(lastFilterIndex, i).trim(); 597 var filter;vue.common.js https://gitlab.com/Mirros/jsdelivr | JavaScript | 2272 lines
179function hyphenate(str) { 180 return str.replace(hyphenateRE, '$1-$2').toLowerCase(); 181} 391 392var isIE9 = inBrowser && navigator.userAgent.toLowerCase().indexOf('msie 9.0') > 0; 393 393 394var isAndroid = inBrowser && navigator.userAgent.toLowerCase().indexOf('android') > 0; 395 577function pushFilter() { 578 var exp = str.slice(lastFilterIndex, i).trim(); 579 var filter; 662 lastFilterIndex = i + 1; 663 dir.expression = str.slice(0, i).trim(); 664 } else {underscore.string.js https://gitlab.com/Mirros/jsdelivr | JavaScript | 673 lines
13 var nativeTrim = String.prototype.trim; 14 var nativeTrimRight = String.prototype.trimRight; 15 var nativeTrimLeft = String.prototype.trimLeft; 343 underscored: function(str){ 344 return _s.trim(str).replace(/([a-z\d])([A-Z]+)/g, '$1_$2').replace(/[-\s]+/g, '_').toLowerCase(); 345 }, 360 if (str == null) return ''; 361 if (!characters && nativeTrim) return nativeTrim.call(str); 362 characters = defaultToWhiteSpace(characters); 367 if (str == null) return ''; 368 if (!characters && nativeTrimLeft) return nativeTrimLeft.call(str); 369 characters = defaultToWhiteSpace(characters); 374 if (str == null) return ''; 375 if (!characters && nativeTrimRight) return nativeTrimRight.call(str); 376 characters = defaultToWhiteSpace(characters);underscore.string.js https://gitlab.com/Mirros/jsdelivr | JavaScript | 614 lines
12 13 var nativeTrim = String.prototype.trim; 14 var nativeTrimRight = String.prototype.trimRight; 14 var nativeTrimRight = String.prototype.trimRight; 15 var nativeTrimLeft = String.prototype.trimLeft; 16 347 if (str == null) return ''; 348 if (!characters && nativeTrim) return nativeTrim.call(str); 349 characters = defaultToWhiteSpace(characters); 354 if (str == null) return ''; 355 if (!characters && nativeTrimLeft) return nativeTrimLeft.call(str); 356 characters = defaultToWhiteSpace(characters); 361 if (str == null) return ''; 362 if (!characters && nativeTrimRight) return nativeTrimRight.call(str); 363 characters = defaultToWhiteSpace(characters);typeahead.js https://gitlab.com/Mirros/jsdelivr | JavaScript | 1139 lines
126 tokenizeQuery: function(str) { 127 return $.trim(str).toLowerCase().split(/[\s]+/); 128 }, 129 tokenizeText: function(str) { 130 return $.trim(str).toLowerCase().split(/[\s\-_]+/); 131 },typeahead.js https://gitlab.com/Mirros/jsdelivr | JavaScript | 1014 lines
129 tokenizeQuery: function(str) { 130 return $.trim(str).toLowerCase().split(/[\s]+/); 131 }, 132 tokenizeText: function(str) { 133 return $.trim(str).toLowerCase().split(/[\s\-_]+/); 134 }, 387 item.tokens = utils.map(item.tokens, function(token) { 388 return token.toLowerCase(); 389 });to-markdown.js https://gitlab.com/Mirros/jsdelivr | JavaScript | 759 lines
33 34function trim(string) { 35 return string.replace(/^[ \r\n\t]+|[ \r\n\t]+$/g, ''); 46function isBlock(node) { 47 return blocks.indexOf(node.nodeName.toLowerCase()) !== -1; 48} 55function isVoid(node) { 56 return voids.indexOf(node.nodeName.toLowerCase()) !== -1; 57} 82 83 if (string.toLowerCase().indexOf('<!doctype') > -1) { 84 newDoc.documentElement.innerHTML = string; 279toMarkdown.isVoid = isVoid; 280toMarkdown.trim = trim; 281toMarkdown.outer = outer;plugin.js https://gitlab.com/Mirros/jsdelivr | JavaScript | 540 lines
297 // Found IMG/INPUT etc 298 if (nonEmptyElements[node.nodeName.toLowerCase()]) { 299 break; 302 // Found text node with contents 303 if (node.nodeType === 3 && tinymce.trim(node.nodeValue).length > 0) { 304 break; 445 function convertRegExpsToNonEditable(e) { 446 var i = nonEditableRegExps.length, content = e.content, cls = tinymce.trim(nonEditClass); 447 471 472 editClass = " " + tinymce.trim(editor.getParam("noneditable_editable_class", "mceEditable")) + " "; 473 nonEditClass = " " + tinymce.trim(editor.getParam("noneditable_noneditable_class", "mceNonEditable")) + " ";tempo.js https://gitlab.com/Mirros/jsdelivr | JavaScript | 693 lines
52 53 trim : function (str) { 54 return str.replace(/^\s*([\S\s]*?)\s*$/, '$1'); 82 equalsIgnoreCase : function (str1, str2) { 83 return str1.toLowerCase() === str2.toLowerCase(); 84 }, 281 if (args !== undefined && args !== '') { 282 var filters = utils.trim(utils.trim(args).substring(1)).split(filterSplitter); 283 for (var p = 0; p < filters.length; p++) { 283 for (var p = 0; p < filters.length; p++) { 284 var filter = utils.trim(filters[p]); 285 var filter_args = [];jquery.tablesorter.js https://gitlab.com/Mirros/jsdelivr | JavaScript | 1031 lines
210 node = getNodeFromRowAndCellIndex(rows, rowIndex, cellIndex); 211 nodeValue = trimAndGetNodeText(table.config, node); 212 if (table.config.debug) { 231 232 function trimAndGetNodeText(config, node) { 233 return $.trim(getElementText(config, node)); 238 for (var i = 0; i < l; i++) { 239 if (parsers[i].id.toLowerCase() == name.toLowerCase()) { 240 return parsers[i];string.js https://gitlab.com/Mirros/jsdelivr | JavaScript | 980 lines
133 dasherize: function() { 134 var s = this.trim().s.replace(/[_\s]+/g, '-').replace(/([A-Z])/g, '-$1').replace(/-+/g, '-').toLowerCase(); 135 return new this.constructor(s); 198 isAlpha: function() { 199 return !/[^a-z\xC0-\xFF]/.test(this.s.toLowerCase()); 200 }, 406 407 trim: function() { 408 var s; 408 var s; 409 if (typeof __nsp.trim === 'undefined') 410 s = this.s.replace(/(^\s*|\s*$)/g, '') 447 else 448 template = new S(template.slice(0, template.length-1)).trimRight().s; 449string.js https://gitlab.com/Mirros/jsdelivr | JavaScript | 934 lines
107 dasherize: function() { 108 var s = this.trim().s.replace(/[_\s]+/g, '-').replace(/([A-Z])/g, '-$1').replace(/-+/g, '-').toLowerCase(); 109 return new S(s); 172 isAlpha: function() { 173 return !/[^a-z\xC0-\xFF]/.test(this.s.toLowerCase()); 174 }, 370 var s; 371 if (typeof __nsp.trim === 'undefined') 372 s = this.s.replace(/(^\s*|\s*$)/g, '') 373 else 374 s = this.s.trim() 375 return new S(s); 485 underscore: function() { 486 var s = this.trim().s.replace(/([a-z\d])([A-Z]+)/g, '$1_$2').replace(/[-\s]+/g, '_').toLowerCase(); 487 if ((new S(this.s.charAt(0))).isUpper()) {string.js https://gitlab.com/Mirros/jsdelivr | JavaScript | 751 lines
78 dasherize: function() { 79 var s = this.trim().s.replace(/[_\s]+/g, '-').replace(/([A-Z])/g, '-$1').replace(/-+/g, '-').toLowerCase(); 80 return new S(s); 112 isAlphaNumeric: function() { 113 return !/[^0-9a-z\xC0-\xFF]/.test(this.s.toLowerCase()); 114 }, 307 } else { 308 s = this.s.trim(); 309 } 312 313 trimLeft: function() { 314 var s; 413 underscore: function() { 414 var s = this.trim().s.replace(/([a-z\d])([A-Z]+)/g, '$1_$2').replace(/[-\s]+/g, '_').toLowerCase(); 415 if ((new S(this.s.charAt(0))).isUpper()) {Sortable.js https://gitlab.com/Mirros/jsdelivr | JavaScript | 1012 lines
137 options[name] = _bind(this, options[name] || noop); 138 _on(el, name.substr(2).toLowerCase(), options[name]); 139 }, this); 215 filter = filter.split(',').some(function (criteria) { 216 criteria = _closest(originalTarget, criteria.trim(), el); 217 245 options.ignore.split(',').forEach(function (criteria) { 246 _find(target, criteria.trim(), _disableDraggable); 247 });socialite.js https://gitlab.com/Mirros/jsdelivr | JavaScript | 706 lines
21 22 trim: function(str) 23 { 23 { 24 return str.trim ? str.trim() : str.replace(/^\s+|\s+$/g,''); 25 }, 40 { 41 el.className = socialite.trim(' ' + el.className + ' '.replace(' ' + cn + ' ', ' ')); 42 }, 262 // stop over-zealous scripts from activating all instances 263 if (el.nodeName.toLowerCase() === 'a' && !el.getAttribute('data-default-href')) { 264 instance.el.setAttribute('data-default-href', el.getAttribute('href'));selectize.js https://gitlab.com/Mirros/jsdelivr | JavaScript | 1911 lines
48 Sifter.prototype.tokenize = function(query) { 49 query = trim(String(query || '').toLowerCase()); 50 if (!query || !query.length) return []; 318 options : options, 319 query : String(query || '').toLowerCase(), 320 tokens : this.tokenize(query), 393 } 394 a = String(a || '').toLowerCase(); 395 b = String(b || '').toLowerCase(); 414 415 var trim = function(str) { 416 return (str + '').replace(/^\s+|\s+$|/g, '');RGraph.common.tooltips.js https://gitlab.com/Mirros/jsdelivr | JavaScript | 575 lines
72 73 var effect = obj.Get('chart.tooltips.effect') ? obj.Get('chart.tooltips.effect').toLowerCase() : 'fade'; 74 95 // Only apply a border if there's content 96 if (RGraph.trim(text).length > 0) { 97 tooltipObj.style.border = '1px #bbb solid';RGraph.common.tooltips.js https://gitlab.com/Mirros/jsdelivr | JavaScript | 653 lines
77 78 var effect = obj.Get('chart.tooltips.effect').toLowerCase(); 79 103 // Only apply a border if there's content 104 if (RGraph.trim(text).length > 0) { 105 tooltipObj.style.border = '1px #bbb solid';quo.debug.js https://gitlab.com/Mirros/jsdelivr | JavaScript | 1248 lines
63 $$.toType = function(obj) { 64 return OBJECT_PROTOTYPE.toString.call(obj).match(/\s([a-z|A-Z]+)/)[1].toLowerCase(); 65 }; 76 } else if (type === "string" && IS_HTML_FRAGMENT.test(selector)) { 77 domain = $$.fragment(selector.trim(), RegExp.$1); 78 selector = null; 276 var elements; 277 selector = selector.trim(); 278 if (CLASS_SELECTOR.test(selector)) { 388 this.className += " " + name; 389 return this.className = this.className.trim(); 390 } 398 if (_existsClass(name, this.className)) { 399 return this.className = this.className.replace(name, " ").replace(/\s+/g, " ").trim(); 400 }code.photoswipe-3.0.5.js https://gitlab.com/Mirros/jsdelivr | JavaScript | 2268 lines
195 /* 196 * Function: trim 197 */ 197 */ 198 trim: function(val) { 199 return val.replace(/^\s\s*/, '').replace(/\s\s*$/, ''); 216 toDashedCase: function(val){ 217 return val.replace(/([A-Z])/g, function($1){return "-"+$1.toLowerCase();}); 218 },parsley.js https://gitlab.com/Mirros/jsdelivr | JavaScript | 1340 lines
87 dasherize: function dasherize(str) { 88 return str.replace(/::/g, '/').replace(/([A-Z]+)([A-Z][a-z])/g, '$1_$2').replace(/([a-z\d])([A-Z])/g, '$1_$2').replace(/_/g, '-').toLowerCase(); 89 }, 107 108 trimString: function trimString(string) { 109 return string.replace(/^\s+|\s+$/g, ''); 112 namespaceEvents: function namespaceEvents(events, namespace) { 113 events = this.trimString(events || '').split(/\s+/); 114 if (!events[0]) return ''; 241 subscribe: function subscribe(name, fn) { 242 $.listenTo(this, name.toLowerCase(), fn); 243 }, 259 unsubscribe: function unsubscribe(name, fn) { 260 $.unsubscribeTo(this, name.toLowerCase()); 261 },parsley.js https://gitlab.com/Mirros/jsdelivr | JavaScript | 1337 lines
87 dasherize: function dasherize(str) { 88 return str.replace(/::/g, '/').replace(/([A-Z]+)([A-Z][a-z])/g, '$1_$2').replace(/([a-z\d])([A-Z])/g, '$1_$2').replace(/_/g, '-').toLowerCase(); 89 }, 107 108 trimString: function trimString(string) { 109 return string.replace(/^\s+|\s+$/g, ''); 230 subscribe: function subscribe(name, fn) { 231 $.listenTo(this, name.toLowerCase(), fn); 232 }, 248 unsubscribe: function unsubscribe(name, fn) { 249 $.unsubscribeTo(this, name.toLowerCase()); 250 }, 360 if (!m) throw 'Requirement is not an array: "' + string + '"'; 361 var values = m[1].split(',').map(ParsleyUtils__default.trimString); 362 if (values.length !== length) throw 'Requirement has ' + values.length + ' values when ' + length + ' are needed';parsley.js https://gitlab.com/Mirros/jsdelivr | JavaScript | 1189 lines
88 .replace(/_/g, '-') 89 .toLowerCase(); 90 }, 103 }, 104 trimString: function(string) { 105 return string.replace(/^\s+|\s+$/g, ''); 200 subscribe: function(name, fn) { 201 $.listenTo(this, name.toLowerCase(), fn); 202 }, 218 unsubscribe: function(name, fn) { 219 $.unsubscribeTo(this, name.toLowerCase()); 220 }, 316 throw 'Requirement is not an array: "' + string + '"'; 317 var values = m[1].split(',').map(ParsleyUtils.trimString); 318 if (values.length !== length)mui-react.js https://gitlab.com/Mirros/jsdelivr | JavaScript | 1257 lines
35 for (var i=0; i < splitClasses.length; i++) { 36 cssClass = splitClasses[i].trim(); 37 if (existingClasses.indexOf(' ' + cssClass + ' ') === -1) { 41 42 element.setAttribute('class', existingClasses.trim()); 43} 111 if (typeStr.indexOf('[object ') === 0) { 112 return typeStr.slice(8, -1).toLowerCase(); 113 } else { 268 for (var i=0; i < splitClasses.length; i++) { 269 cssClass = splitClasses[i].trim(); 270 while (existingClasses.indexOf(' ' + cssClass + ' ') >= 0) { 274 275 element.setAttribute('class', existingClasses.trim()); 276}mootools-core-nocompat.js https://gitlab.com/Mirros/jsdelivr | JavaScript | 2014 lines
166 if (name){ 167 var lower = name.toLowerCase(); 168 var typeCheck = function(item){ 278 'charAt', 'charCodeAt', 'concat', 'contains', 'indexOf', 'lastIndexOf', 'match', 'quote', 'replace', 'search', 279 'slice', 'split', 'substr', 'substring', 'trim', 'toLowerCase', 'toUpperCase' 280])('Array', Array, [ 617 618 trim: function(){ 619 return String(this).replace(/^\s+|\s+$/g, ''); 622 clean: function(){ 623 return String(this).replace(/\s+/g, ' ').trim(); 624 }, 633 return String(this).replace(/[A-Z]/g, function(match){ 634 return ('-' + match.charAt(0).toLowerCase()); 635 });mootools-core-compat.js https://gitlab.com/Mirros/jsdelivr | JavaScript | 2172 lines
159 if (name){ 160 var lower = name.toLowerCase(); 161 var typeCheck = function(item){ 273 'charAt', 'charCodeAt', 'concat', 'contains', 'indexOf', 'lastIndexOf', 'match', 'quote', 'replace', 'search', 274 'slice', 'split', 'substr', 'substring', 'trim', 'toLowerCase', 'toUpperCase' 275])('Array', Array, [mootools-core-compat.js https://gitlab.com/Mirros/jsdelivr | JavaScript | 2145 lines
166 if (name){ 167 var lower = name.toLowerCase(); 168 var typeCheck = function(item){ 280 'charAt', 'charCodeAt', 'concat', 'indexOf', 'lastIndexOf', 'match', 'quote', 'replace', 'search', 281 'slice', 'split', 'substr', 'substring', 'trim', 'toLowerCase', 'toUpperCase' 282])('Array', Array, [jquery.wookmark.js https://gitlab.com/Mirros/jsdelivr | JavaScript | 492 lines
57 function cleanFilterName(filterName) { 58 return $.trim(filterName).toLowerCase(); 59 }jquery.wookmark.js https://gitlab.com/Mirros/jsdelivr | JavaScript | 452 lines
80 for (j = 0; j < itemFilterClasses.length; j++) { 81 filterClass = $.trim(itemFilterClasses[j]).toLowerCase(); 82 132 for (i = 0; i < filters.length; i++) { 133 filter = $.trim(filters[i].toLowerCase()); 134 if (filter in this.filterClasses) {jquery.effects.core.js https://gitlab.com/Mirros/jsdelivr | JavaScript | 746 lines
70 // Otherwise, we're most likely dealing with a named color 71 return colors[$.trim(color).toLowerCase()]; 72}jquery.terminal-src.js https://gitlab.com/Mirros/jsdelivr | JavaScript | 1207 lines
157 } 158 var result = this.regex.exec(jQuery.trim(value.toString())); 159 if (result[2]) { 275 if (jQuery.browser && jQuery.browser.msie || 276 /(msie) ([\w.]+)/.exec(navigator.userAgent.toLowerCase())) { 277 jQuery(window).one('unload', function() {jquery.jeditable.js https://gitlab.com/Mirros/jsdelivr | JavaScript | 546 lines
120 /* If element is empty add something clickable (if requested) */ 121 if (!$.trim($(this).html())) { 122 $(this).html(settings.placeholder); 167 /* Remove placeholder text, replace is here because of IE. */ 168 if ($(this).html().toLowerCase().replace(/(;|"|\/)/g, '') == 169 settings.placeholder.toLowerCase().replace(/(;|"|\/)/g, '')) { 315 /* TODO: this is not dry */ 316 if (!$.trim($(self).html())) { 317 $(self).html(settings.placeholder);jquery.css3finalize.js https://gitlab.com/Mirros/jsdelivr | JavaScript | 556 lines
34 var deCamelCase = function(str) { 35 return str.replace(/[A-Z]/g, function($0) { return '-' + $0.toLowerCase() }); 36 } 94 var s = $.camelCase(css); 95 return (currentPrefix == 'ms') ? s.charAt(0).toLowerCase() + s.substr(1) : s; 96 } 117 cssText = cleanCss(cssText); 118 if ($.trim(cssText) === '') { 119 return; 185 if (i % 2 === 0) { 186 var selector = $.trim(block[i]); 187 if (recusiveBlock) { 233 if (i % 2 == 1) { 234 objAttribute[$.trim(attribute[i-1])] = $.trim(n.substr(1).replace(';', '').replace( /url\(([^)]+)\)/g, function(url){ 235 return url.replace( /\[cssFinalize\]/g, ';' );canvas-tools.src.js https://gitlab.com/Mirros/jsdelivr | JavaScript | 1585 lines
17 color_string = color_string.replace(/ /g,''); 18 color_string = color_string.toLowerCase(); 19 420 421 // trim 422 svg.trim = function(s) { return s.replace(/^\s+|\s+$/g, ''); }fuelux.js https://gitlab.com/Mirros/jsdelivr | JavaScript | 1840 lines
45 46 if ( element.tagName.toLowerCase() !== 'label' ) { 47 //console.log('initialize checkbox on the label that wraps the checkbox'); 287 this.$selectedItem = $item; 288 this.$input.val( this.$selectedItem.text().trim() ); 289 } else { 309 if ( item ) { 310 var txt = this.$selectedItem.text().trim(); 311 data = $.extend( { 325 this.$element.find( 'li' ).each( function() { 326 if ( ( this.textContent || this.innerText || $( this ).text() || '' ).toLowerCase() === ( text || '' ).toLowerCase() ) { 327 $item = $( this ); 377 // set input text and trigger input change event marked as synthetic 378 this.$input.val( this.$selectedItem.text().trim() ).trigger( 'change', { 379 synthetic: truefuelux.js https://gitlab.com/Mirros/jsdelivr | JavaScript | 1787 lines
336 this.$selectedItem = $item; 337 this.$input.val( this.$selectedItem.text().trim() ); 338 } else { 358 if ( item ) { 359 var txt = this.$selectedItem.text().trim(); 360 data = $.extend( { 374 this.$element.find( 'li' ).each( function() { 375 if ( ( this.textContent || this.innerText || $( this ).text() || '' ).toLowerCase() === ( text || '' ).toLowerCase() ) { 376 $item = $( this ); 426 // set input text and trigger input change event marked as synthetic 427 this.$input.val( this.$selectedItem.text().trim() ).trigger( 'change', { 428 synthetic: truescheduler.js https://gitlab.com/Mirros/jsdelivr | JavaScript | 512 lines
122 var repeat = this.$repeatIntervalSelect.select('selectedItem').value; 123 var startTime = this.$startTime.combobox('selectedItem').text.toLowerCase(); 124 var timeZone = this.$timeZone.select('selectedItem'); 145 hasPm = (startTime.search('pm')>=0); 146 startTime = $.trim(startTime.replace(/am/g, '').replace(/pm/g, '')).split(':'); 147 startTime[0] = parseInt(startTime[0], 10); 269 270 switch(val.toLowerCase()) { 271 case 'hourly': 340 if(temp.search(/\+/)>-1){ 341 temp = '+' + $.trim(temp.split('+')[1]); 342 }else if(temp.search(/\-/)>-1){ 342 }else if(temp.search(/\-/)>-1){ 343 temp = '-' + $.trim(temp.split('-')[1]); 344 }else{cutter.developer.js https://gitlab.com/Mirros/jsdelivr | JavaScript | 546 lines
219 /** 220 * trim is an utilities method used to keep out all the spaces before or after the sentence 221 * @member Cutter.prototype 222 * @author Tomas Corral Casas 223 * @param {string} sString This is the text to be trimmed 224 * @private 224 * @private 225 * @return the trimmed string 226 * @type String 227 */ 228 Cutter.prototype.trim = function (sString) { 229 return sString.replace(/^\s+/g, '').replace(/\s+$/g, ''); 240 Cutter.prototype.countWords = function (sText) { 241 return this.trim(sText).split(" ").length; 242 };bootstrap-material-design.css https://gitlab.com/Mirros/jsdelivr | CSS | 1455 lines
10 $(".color-group").each(function() { 11 var color = $(this).find(".name").text().trim().toLowerCase().replace(" ", "-"); 12 colors[color] = {}; 14 $(this).find(".color").not(".main-color").each(function() { 15 var shade = $(this).find(".shade").text().trim(), 16 hex = $(this).find(".hex").text().trim(); 19 }); 20 main[color] = color + "-" + $(this).find(".main-color .shade").text().trim(); 21aping-plugin-bandsintown.js https://gitlab.com/Mirros/jsdelivr | JavaScript | 388 lines
140 this.compareStrings = function (_string1, _string2) { 141 return _string1.toLowerCase().trim().replace(/ /g, "") === _string2.toLowerCase().trim().replace(/ /g, ""); 142aping-plugin-bandsintown.js https://gitlab.com/Mirros/jsdelivr | JavaScript | 390 lines
141 this.compareStrings = function (_string1, _string2) { 142 return _string1.toLowerCase().trim().replace(/ /g, "") === _string2.toLowerCase().trim().replace(/ /g, ""); 143angular.js https://gitlab.com/Mirros/jsdelivr | JavaScript | 1705 lines
127 -isBoolean, 128 -trim, 129 -isElement, 176 */ 177var lowercase = function(string){return isString(string) ? string.toLowerCase() : string;}; 178 205 206// String#toLowerCase and String#toUpperCase don't produce correct results in browsers with Turkish 207// locale, for this reason we need to detect this case and redefine lowercase/uppercase methods 208// with correct but slower alternatives. 209if ('i' !== 'I'.toLowerCase()) { 210 lowercase = manualLowercase;angular.js https://gitlab.com/Mirros/jsdelivr | JavaScript | 1618 lines
19 */ 20var lowercase = function(string){return isString(string) ? string.toLowerCase() : string;}; 21 46 47// String#toLowerCase and String#toUpperCase don't produce correct results in browsers with Turkish 48// locale, for this reason we need to detect this case and redefine lowercase/uppercase methods 49// with correct but slower alternatives. 50if ('i' !== 'I'.toLowerCase()) { 51 lowercase = manualLowercase; 399 400function trim(value) { 401 return isString(value) ? value.replace(/^\s*/, '').replace(/\s*$/, '') : value;textAngular.js https://gitlab.com/Mirros/jsdelivr | JavaScript | 1060 lines
22 var tempEl = curelement; 23 while(tempEl !== null && tempEl.tagName.toLowerCase() !== 'html' && !isEditable){ 24 isEditable = tempEl.contentEditable === 'true'; 70 71 // Thanks to answer in http://stackoverflow.com/questions/2308134/trim-in-javascript-not-working-in-ie 72 /* istanbul ignore next: trim shim for older browsers */ 72 /* istanbul ignore next: trim shim for older browsers */ 73 if(typeof String.prototype.trim !== 'function') { 74 String.prototype.trim = function() {textAngular.js https://gitlab.com/Mirros/jsdelivr | JavaScript | 1071 lines
22 var tempEl = curelement; 23 while(tempEl !== null && tempEl.tagName.toLowerCase() !== 'html' && !isEditable){ 24 isEditable = tempEl.contentEditable === 'true'; 68 69 // Thanks to answer in http://stackoverflow.com/questions/2308134/trim-in-javascript-not-working-in-ie 70 /* istanbul ignore next: trim shim for older browsers */ 70 /* istanbul ignore next: trim shim for older browsers */ 71 if(typeof String.prototype.trim !== 'function') { 72 String.prototype.trim = function() {event-key-coverage.js https://gitlab.com/Mirros/cdnjs | JavaScript | 243 lines
28}; 29_yuitest_coverage["build/event-key/event-key.js"].code=["YUI.add('event-key', function (Y, NAME) {","","/**"," * Functionality to listen for one or more specific key combinations."," * @module event"," * @submodule event-key"," */","","var ALT = \"+alt\","," CTRL = \"+ctrl\","," META = \"+meta\","," SHIFT = \"+shift\",",""," trim = Y.Lang.trim,",""," eventDef = {"," KEY_MAP: {"," enter : 13,"," esc : 27,"," backspace: 8,"," tab : 9,"," pageup : 33,"," pagedown : 34"," },",""," _typeRE: /^(up|down|press):/,"," _keysRE: /^(?:up|down|press):|\\+(alt|ctrl|meta|shift)/g,",""," processArgs: function (args) {"," var spec = args.splice(3,1)[0],"," mods = Y.Array.hash(spec.match(/\\+(?:alt|ctrl|meta|shift)\\b/g) || []),"," config = {"," type: this._typeRE.test(spec) ? RegExp.$1 : null,"," mods: mods,"," keys: null"," },"," // strip type and modifiers from spec, leaving only keyCodes"," bits = spec.replace(this._keysRE, ''),"," chr, uc, lc, i;",""," if (bits) {"," bits = bits.split(',');",""," config.keys = {};",""," // FIXME: need to support '65,esc' => keypress, keydown"," for (i = bits.length - 1; i >= 0; --i) {"," chr = trim(bits[i]);",""," // catch sloppy filters, trailing commas, etc 'a,,'"," if (!chr) {"," continue;"," }",""," // non-numerics are single characters or key names"," if (+chr == chr) {"," config.keys[chr] = mods;"," } else {"," lc = chr.toLowerCase();",""," if (this.KEY_MAP[lc]) {"," config.keys[this.KEY_MAP[lc]] = mods;"," // FIXME: '65,enter' defaults keydown for both"," if (!config.type) {"," config.type = \"down\"; // safest"," }"," } else {"," // FIXME: Character mapping only works for keypress"," // events. Otherwise, it uses String.fromCharCode()"," // from the keyCode, which is wrong."," chr = chr.charAt(0);"," uc = chr.toUpperCase();",""," if (mods[\"+shift\"]) {"," chr = uc;"," }",""," // FIXME: stupid assumption that"," // the keycode of the lower case == the"," // charCode of the upper case"," // a (key:65,char:97), A (key:65,char:65)"," config.keys[chr.charCodeAt(0)] ="," (chr === uc) ?"," // upper case chars get +shift free"," Y.merge(mods, { \"+shift\": true }) :"," mods;"," }"," }"," }"," }",""," if (!config.type) {"," config.type = \"press\";"," }",""," return config;"," },",""," on: function (node, sub, notifier, filter) {"," var spec = sub._extra,"," type = \"key\" + spec.type,"," keys = spec.keys,"," method = (filter) ? \"delegate\" : \"on\";",""," // Note: without specifying any keyCodes, this becomes a"," // horribly inefficient alias for 'keydown' (et al), but I"," // can't abort this subscription for a simple"," // Y.on('keypress', ...);"," // Please use keyCodes or just subscribe directly to keydown,"," // keyup, or keypress"," sub._detach = node[method](type, function (e) {"," var key = keys ? keys[e.which] : spec.mods;",""," if (key &&"," (!key[ALT] || (key[ALT] && e.altKey)) &&"," (!key[CTRL] || (key[CTRL] && e.ctrlKey)) &&"," (!key[META] || (key[META] && e.metaKey)) &&"," (!key[SHIFT] || (key[SHIFT] && e.shiftKey)))"," {"," notifier.fire(e);"," }"," }, filter);"," },",""," detach: function (node, sub, notifier) {"," sub._detach.detach();"," }"," };","","eventDef.delegate = eventDef.on;","eventDef.detachDelegate = eventDef.detach;","","/**"," * <p>Add a key listener. The listener will only be notified if the"," * keystroke detected meets the supplied specification. The"," * specification is a string that is defined as:</p>"," * "," * <dl>"," * <dt>spec</dt>"," * <dd><code>[{type}:]{code}[,{code}]*</code></dd>"," * <dt>type</dt>"," * <dd><code>\"down\", \"up\", or \"press\"</code></dd>"," * <dt>code</dt>"," * <dd><code>{keyCode|character|keyName}[+{modifier}]*</code></dd>"," * <dt>modifier</dt>"," * <dd><code>\"shift\", \"ctrl\", \"alt\", or \"meta\"</code></dd>"," * <dt>keyName</dt>"," * <dd><code>\"enter\", \"backspace\", \"esc\", \"tab\", \"pageup\", or \"pagedown\"</code></dd>"," * </dl>"," *"," * <p>Examples:</p>"," * <ul>"," * <li><code>Y.on(\"key\", callback, \"press:12,65+shift+ctrl\", \"#my-input\");</code></li>"," * <li><code>Y.delegate(\"key\", preventSubmit, \"#forms\", \"enter\", \"input[type=text]\");</code></li>"," * <li><code>Y.one(\"doc\").on(\"key\", viNav, \"j,k,l,;\");</code></li>"," * </ul>"," * "," * @event key"," * @for YUI"," * @param type {string} 'key'"," * @param fn {function} the function to execute"," * @param id {string|HTMLElement|collection} the element(s) to bind"," * @param spec {string} the keyCode and modifier specification"," * @param o optional context object"," * @param args 0..n additional arguments to provide to the listener."," * @return {Event.Handle} the detach handle"," */","Y.Event.define('key', eventDef, true);","","","}, '@VERSION@', {\"requires\": [\"event-synthetic\"]});"]; 30_yuitest_coverage["build/event-key/event-key.js"].lines = {"1":0,"9":0,"30":0,"41":0,"42":0,"44":0,"47":0,"48":0,"51":0,"52":0,"56":0,"57":0,"59":0,"61":0,"62":0,"64":0,"65":0,"71":0,"72":0,"74":0,"75":0,"82":0,"92":0,"93":0,"96":0,"100":0,"111":0,"112":0,"114":0,"120":0,"126":0,"130":0,"131":0,"168":0}; 49 50 trim = Y.Lang.trim, 51 90 _yuitest_coverline("build/event-key/event-key.js", 48); 91chr = trim(bits[i]); 92 106 _yuitest_coverline("build/event-key/event-key.js", 59); 107lc = chr.toLowerCase(); 108dom-base-coverage.js https://gitlab.com/Mirros/cdnjs | JavaScript | 676 lines
28}; 29_yuitest_coverage["build/dom-base/dom-base.js"].code=["YUI.add('dom-base', function (Y, NAME) {","","/**","* @for DOM","* @module dom","*/","var documentElement = Y.config.doc.documentElement,"," Y_DOM = Y.DOM,"," TAG_NAME = 'tagName',"," OWNER_DOCUMENT = 'ownerDocument',"," EMPTY_STRING = '',"," addFeature = Y.Features.add,"," testFeature = Y.Features.test;","","Y.mix(Y_DOM, {"," /**"," * Returns the text content of the HTMLElement. "," * @method getText "," * @param {HTMLElement} element The html element. "," * @return {String} The text content of the element (includes text of any descending elements)."," */"," getText: (documentElement.textContent !== undefined) ?"," function(element) {"," var ret = '';"," if (element) {"," ret = element.textContent;"," }"," return ret || '';"," } : function(element) {"," var ret = '';"," if (element) {"," ret = element.innerText || element.nodeValue; // might be a textNode"," }"," return ret || '';"," },",""," /**"," * Sets the text content of the HTMLElement. "," * @method setText "," * @param {HTMLElement} element The html element. "," * @param {String} content The content to add. "," */"," setText: (documentElement.textContent !== undefined) ?"," function(element, content) {"," if (element) {"," element.textContent = content;"," }"," } : function(element, content) {"," if ('innerText' in element) {"," element.innerText = content;"," } else if ('nodeValue' in element) {"," element.nodeValue = content;"," }"," },",""," CUSTOM_ATTRIBUTES: (!documentElement.hasAttribute) ? { // IE < 8"," 'for': 'htmlFor',"," 'class': 'className'"," } : { // w3c"," 'htmlFor': 'for',"," 'className': 'class'"," },",""," /**"," * Provides a normalized attribute interface. "," * @method setAttribute"," * @param {HTMLElement} el The target element for the attribute."," * @param {String} attr The attribute to set."," * @param {String} val The value of the attribute."," */"," setAttribute: function(el, attr, val, ieAttr) {"," if (el && attr && el.setAttribute) {"," attr = Y_DOM.CUSTOM_ATTRIBUTES[attr] || attr;"," el.setAttribute(attr, val, ieAttr);"," }"," },","",""," /**"," * Provides a normalized attribute interface. "," * @method getAttribute"," * @param {HTMLElement} el The target element for the attribute."," * @param {String} attr The attribute to get."," * @return {String} The current value of the attribute. "," */"," getAttribute: function(el, attr, ieAttr) {"," ieAttr = (ieAttr !== undefined) ? ieAttr : 2;"," var ret = '';"," if (el && attr && el.getAttribute) {"," attr = Y_DOM.CUSTOM_ATTRIBUTES[attr] || attr;"," ret = el.getAttribute(attr, ieAttr);",""," if (ret === null) {"," ret = ''; // per DOM spec"," }"," }"," return ret;"," },",""," VALUE_SETTERS: {},",""," VALUE_GETTERS: {},",""," getValue: function(node) {"," var ret = '', // TODO: return null?"," getter;",""," if (node && node[TAG_NAME]) {"," getter = Y_DOM.VALUE_GETTERS[node[TAG_NAME].toLowerCase()];",""," if (getter) {"," ret = getter(node);"," } else {"," ret = node.value;"," }"," }",""," // workaround for IE8 JSON stringify bug"," // which converts empty string values to null"," if (ret === EMPTY_STRING) {"," ret = EMPTY_STRING; // for real"," }",""," return (typeof ret === 'string') ? ret : '';"," },",""," setValue: function(node, val) {"," var setter;",""," if (node && node[TAG_NAME]) {"," setter = Y_DOM.VALUE_SETTERS[node[TAG_NAME].toLowerCase()];",""," if (setter) {"," setter(node, val);"," } else {"," node.value = val;"," }"," }"," },",""," creators: {}","});","","addFeature('value-set', 'select', {"," test: function() {"," var node = Y.config.doc.createElement('select');"," node.innerHTML = '<option>1</option><option>2</option>';"," node.value = '2';"," return (node.value && node.value === '2');"," }","});","","if (!testFeature('value-set', 'select')) {"," Y_DOM.VALUE_SETTERS.select = function(node, val) {"," for (var i = 0, options = node.getElementsByTagName('option'), option;"," option = options[i++];) {"," if (Y_DOM.getValue(option) === val) {"," option.selected = true;"," //Y_DOM.setAttribute(option, 'selected', 'selected');"," break;"," }"," }"," };","}","","Y.mix(Y_DOM.VALUE_GETTERS, {"," button: function(node) {"," return (node.attributes && node.attributes.value) ? node.attributes.value.value : '';"," }","});","","Y.mix(Y_DOM.VALUE_SETTERS, {"," // IE: node.value changes the button text, which should be handled via innerHTML"," button: function(node, val) {"," var attr = node.attributes.value;"," if (!attr) {"," attr = node[OWNER_DOCUMENT].createAttribute('value');"," node.setAttributeNode(attr);"," }",""," attr.value = val;"," }","});","","","Y.mix(Y_DOM.VALUE_GETTERS, {"," option: function(node) {"," var attrs = node.attributes;"," return (attrs.value && attrs.value.specified) ? node.value : node.text;"," },",""," select: function(node) {"," var val = node.value,"," options = node.options;",""," if (options && options.length) {"," // TODO: implement multipe select"," if (node.multiple) {"," } else if (node.selectedIndex > -1) {"," val = Y_DOM.getValue(options[node.selectedIndex]);"," }"," }",""," return val;"," }","});","var addClass, hasClass, removeClass;","","Y.mix(Y.DOM, {"," /**"," * Determines whether a DOM element has the given className."," * @method hasClass"," * @for DOM"," * @param {HTMLElement} element The DOM element. "," * @param {String} className the class name to search for"," * @return {Boolean} Whether or not the element has the given class. "," */"," hasClass: function(node, className) {"," var re = Y.DOM._getRegExp('(?:^|\\\\s+)' + className + '(?:\\\\s+|$)');"," return re.test(node.className);"," },",""," /**"," * Adds a class name to a given DOM element."," * @method addClass "," * @for DOM"," * @param {HTMLElement} element The DOM element. "," * @param {String} className the class name to add to the class attribute"," */"," addClass: function(node, className) {"," if (!Y.DOM.hasClass(node, className)) { // skip if already present "," node.className = Y.Lang.trim([node.className, className].join(' '));"," }"," },",""," /**"," * Removes a class name from a given element."," * @method removeClass "," * @for DOM"," * @param {HTMLElement} element The DOM element. "," * @param {String} className the class name to remove from the class attribute"," */"," removeClass: function(node, className) {"," if (className && hasClass(node, className)) {"," node.className = Y.Lang.trim(node.className.replace(Y.DOM._getRegExp('(?:^|\\\\s+)' +"," className + '(?:\\\\s+|$)'), ' '));",""," if ( hasClass(node, className) ) { // in case of multiple adjacent"," removeClass(node, className);"," }"," } "," },",""," /**"," * Replace a class with another class for a given element."," * If no oldClassName is present, the newClassName is simply added."," * @method replaceClass "," * @for DOM"," * @param {HTMLElement} element The DOM element "," * @param {String} oldClassName the class name to be replaced"," * @param {String} newClassName the class name that will be replacing the old class name"," */"," replaceClass: function(node, oldC, newC) {"," removeClass(node, oldC); // remove first in case oldC === newC"," addClass(node, newC);"," },",""," /**"," * If the className exists on the node it is removed, if it doesn't exist it is added."," * @method toggleClass "," * @for DOM"," * @param {HTMLElement} element The DOM element"," * @param {String} className the class name to be toggled"," * @param {Boolean} addClass optional boolean to indicate whether class"," * should be added or removed regardless of current state"," */"," toggleClass: function(node, className, force) {"," var add = (force !== undefined) ? force :"," !(hasClass(node, className));",""," if (add) {"," addClass(node, className);"," } else {"," removeClass(node, className);"," }"," }","});","","hasClass = Y.DOM.hasClass;","removeClass = Y.DOM.removeClass;","addClass = Y.DOM.addClass;","","var re_tag = /<([a-z]+)/i,",""," Y_DOM = Y.DOM,",""," addFeature = Y.Features.add,"," testFeature = Y.Features.test,",""," creators = {},",""," createFromDIV = function(html, tag) {"," var div = Y.config.doc.createElement('div'),"," ret = true;",""," div.innerHTML = html;"," if (!div.firstChild || div.firstChild.tagName !== tag.toUpperCase()) {"," ret = false;"," }",""," return ret;"," },",""," re_tbody = /(?:\\/(?:thead|tfoot|tbody|caption|col|colgroup)>)+\\s*<tbody/,",""," TABLE_OPEN = '<table>',"," TABLE_CLOSE = '</table>';","","Y.mix(Y.DOM, {"," _fragClones: {},",""," _create: function(html, doc, tag) {"," tag = tag || 'div';",""," var frag = Y_DOM._fragClones[tag];"," if (frag) {"," frag = frag.cloneNode(false);"," } else {"," frag = Y_DOM._fragClones[tag] = doc.createElement(tag);"," }"," frag.innerHTML = html;"," return frag;"," },",""," _children: function(node, tag) {"," var i = 0,"," children = node.children,"," childNodes,"," hasComments,"," child;",""," if (children && children.tags) { // use tags filter when possible"," if (tag) {"," children = node.children.tags(tag);"," } else { // IE leaks comments into children"," hasComments = children.tags('!').length;"," }"," }"," "," if (!children || (!children.tags && tag) || hasComments) {"," childNodes = children || node.childNodes;"," children = [];"," while ((child = childNodes[i++])) {"," if (child.nodeType === 1) {"," if (!tag || tag === child.tagName) {"," children.push(child);"," }"," }"," }"," }",""," return children || [];"," },",""," /**"," * Creates a new dom node using the provided markup string. "," * @method create"," * @param {String} html The markup used to create the element"," * @param {HTMLDocument} doc An optional document context "," * @return {HTMLElement|DocumentFragment} returns a single HTMLElement "," * when creating one node, and a documentFragment when creating"," * multiple nodes."," */"," create: function(html, doc) {"," if (typeof html === 'string') {"," html = Y.Lang.trim(html); // match IE which trims whitespace from innerHTML",""," }",""," doc = doc || Y.config.doc;"," var m = re_tag.exec(html),"," create = Y_DOM._create,"," custom = creators,"," ret = null,"," creator,"," tag, nodes;",""," if (html != undefined) { // not undefined or null"," if (m && m[1]) {"," creator = custom[m[1].toLowerCase()];"," if (typeof creator === 'function') {"," create = creator; "," } else {"," tag = creator;"," }"," }",""," nodes = create(html, doc, tag).childNodes;",""," if (nodes.length === 1) { // return single node, breaking parentNode ref from \"fragment\""," ret = nodes[0].parentNode.removeChild(nodes[0]);"," } else if (nodes[0] && nodes[0].className === 'yui3-big-dummy') { // using dummy node to preserve some attributes (e.g. OPTION not selected)"," if (nodes.length === 2) {"," ret = nodes[0].nextSibling;"," } else {"," nodes[0].parentNode.removeChild(nodes[0]); "," ret = Y_DOM._nl2frag(nodes, doc);"," }"," } else { // return multiple nodes as a fragment"," ret = Y_DOM._nl2frag(nodes, doc);"," }",""," }",""," return ret;"," },",""," _nl2frag: function(nodes, doc) {"," var ret = null,"," i, len;",""," if (nodes && (nodes.push || nodes.item) && nodes[0]) {"," doc = doc || nodes[0].ownerDocument; "," ret = doc.createDocumentFragment();",""," if (nodes.item) { // convert live list to static array"," nodes = Y.Array(nodes, 0, true);"," }",""," for (i = 0, len = nodes.length; i < len; i++) {"," ret.appendChild(nodes[i]); "," }"," } // else inline with log for minification"," return ret;"," },",""," /**"," * Inserts content in a node at the given location "," * @method addHTML"," * @event-key-coverage.js https://gitlab.com/Mirros/cdnjs | JavaScript | 243 lines
28}; 29_yuitest_coverage["build/event-key/event-key.js"].code=["YUI.add('event-key', function (Y, NAME) {","","/**"," * Functionality to listen for one or more specific key combinations."," * @module event"," * @submodule event-key"," */","","var ALT = \"+alt\","," CTRL = \"+ctrl\","," META = \"+meta\","," SHIFT = \"+shift\",",""," trim = Y.Lang.trim,",""," eventDef = {"," KEY_MAP: {"," enter : 13,"," esc : 27,"," backspace: 8,"," tab : 9,"," pageup : 33,"," pagedown : 34"," },",""," _typeRE: /^(up|down|press):/,"," _keysRE: /^(?:up|down|press):|\\+(alt|ctrl|meta|shift)/g,",""," processArgs: function (args) {"," var spec = args.splice(3,1)[0],"," mods = Y.Array.hash(spec.match(/\\+(?:alt|ctrl|meta|shift)\\b/g) || []),"," config = {"," type: this._typeRE.test(spec) ? RegExp.$1 : null,"," mods: mods,"," keys: null"," },"," // strip type and modifiers from spec, leaving only keyCodes"," bits = spec.replace(this._keysRE, ''),"," chr, uc, lc, i;",""," if (bits) {"," bits = bits.split(',');",""," config.keys = {};",""," // FIXME: need to support '65,esc' => keypress, keydown"," for (i = bits.length - 1; i >= 0; --i) {"," chr = trim(bits[i]);",""," // catch sloppy filters, trailing commas, etc 'a,,'"," if (!chr) {"," continue;"," }",""," // non-numerics are single characters or key names"," if (+chr == chr) {"," config.keys[chr] = mods;"," } else {"," lc = chr.toLowerCase();",""," if (this.KEY_MAP[lc]) {"," config.keys[this.KEY_MAP[lc]] = mods;"," // FIXME: '65,enter' defaults keydown for both"," if (!config.type) {"," config.type = \"down\"; // safest"," }"," } else {"," // FIXME: Character mapping only works for keypress"," // events. Otherwise, it uses String.fromCharCode()"," // from the keyCode, which is wrong."," chr = chr.charAt(0);"," uc = chr.toUpperCase();",""," if (mods[\"+shift\"]) {"," chr = uc;"," }",""," // FIXME: stupid assumption that"," // the keycode of the lower case == the"," // charCode of the upper case"," // a (key:65,char:97), A (key:65,char:65)"," config.keys[chr.charCodeAt(0)] ="," (chr === uc) ?"," // upper case chars get +shift free"," Y.merge(mods, { \"+shift\": true }) :"," mods;"," }"," }"," }"," }",""," if (!config.type) {"," config.type = \"press\";"," }",""," return config;"," },",""," on: function (node, sub, notifier, filter) {"," var spec = sub._extra,"," type = \"key\" + spec.type,"," keys = spec.keys,"," method = (filter) ? \"delegate\" : \"on\";",""," // Note: without specifying any keyCodes, this becomes a"," // horribly inefficient alias for 'keydown' (et al), but I"," // can't abort this subscription for a simple"," // Y.on('keypress', ...);"," // Please use keyCodes or just subscribe directly to keydown,"," // keyup, or keypress"," sub._detach = node[method](type, function (e) {"," var key = keys ? keys[e.which] : spec.mods;",""," if (key &&"," (!key[ALT] || (key[ALT] && e.altKey)) &&"," (!key[CTRL] || (key[CTRL] && e.ctrlKey)) &&"," (!key[META] || (key[META] && e.metaKey)) &&"," (!key[SHIFT] || (key[SHIFT] && e.shiftKey)))"," {"," notifier.fire(e);"," }"," }, filter);"," },",""," detach: function (node, sub, notifier) {"," sub._detach.detach();"," }"," };","","eventDef.delegate = eventDef.on;","eventDef.detachDelegate = eventDef.detach;","","/**"," * <p>Add a key listener. The listener will only be notified if the"," * keystroke detected meets the supplied specification. The"," * specification is a string that is defined as:</p>"," * "," * <dl>"," * <dt>spec</dt>"," * <dd><code>[{type}:]{code}[,{code}]*</code></dd>"," * <dt>type</dt>"," * <dd><code>\"down\", \"up\", or \"press\"</code></dd>"," * <dt>code</dt>"," * <dd><code>{keyCode|character|keyName}[+{modifier}]*</code></dd>"," * <dt>modifier</dt>"," * <dd><code>\"shift\", \"ctrl\", \"alt\", or \"meta\"</code></dd>"," * <dt>keyName</dt>"," * <dd><code>\"enter\", \"backspace\", \"esc\", \"tab\", \"pageup\", or \"pagedown\"</code></dd>"," * </dl>"," *"," * <p>Examples:</p>"," * <ul>"," * <li><code>Y.on(\"key\", callback, \"press:12,65+shift+ctrl\", \"#my-input\");</code></li>"," * <li><code>Y.delegate(\"key\", preventSubmit, \"enter\", \"#forms\", \"input[type=text]\");</code></li>"," * <li><code>Y.one(\"doc\").on(\"key\", viNav, \"j,k,l,;\");</code></li>"," * </ul>"," * "," * @event key"," * @for YUI"," * @param type {string} 'key'"," * @param fn {function} the function to execute"," * @param id {string|HTMLElement|collection} the element(s) to bind"," * @param spec {string} the keyCode and modifier specification"," * @param o optional context object"," * @param args 0..n additional arguments to provide to the listener."," * @return {Event.Handle} the detach handle"," */","Y.Event.define('key', eventDef, true);","","","}, '@VERSION@', {\"requires\": [\"event-synthetic\"]});"]; 30_yuitest_coverage["build/event-key/event-key.js"].lines = {"1":0,"9":0,"30":0,"41":0,"42":0,"44":0,"47":0,"48":0,"51":0,"52":0,"56":0,"57":0,"59":0,"61":0,"62":0,"64":0,"65":0,"71":0,"72":0,"74":0,"75":0,"82":0,"92":0,"93":0,"96":0,"100":0,"111":0,"112":0,"114":0,"120":0,"126":0,"130":0,"131":0,"168":0}; 49 50 trim = Y.Lang.trim, 51 90 _yuitest_coverline("build/event-key/event-key.js", 48); 91chr = trim(bits[i]); 92 106 _yuitest_coverline("build/event-key/event-key.js", 59); 107lc = chr.toLowerCase(); 108