Commits

Stephen McKamey  committed 769fa4d

- changing test to use '==='

  • Participants
  • Parent commits 7a1fbcb

Comments (0)

Files changed (3)

File duel/dueljs/src/main/javascript/types.js

 		if (Buffer.FAST) {
 			this.value += v1;
 
-			/*jslint eqeqeq: false */
-			if (v2 != null) {
+			if (v2 !== null && v2 !== undefined) {
 				this.value += v2;
 
-				if (v3 != null) {
+				if (v3 !== null && v3 !== undefined) {
 					this.value += v3;
 				}
 			}
-			/*jslint eqeqeq: true */
 		} else {
 			this.value.push.apply(
 				// Closure Compiler type cast

File duel/dueljs/target/duel.js

 		if (Buffer.FAST) {
 			this.value += v1;
 
-			/*jslint eqeqeq: false */
-			if (v2 != null) {
+			if (v2 !== null && v2 !== undefined) {
 				this.value += v2;
 
-				if (v3 != null) {
+				if (v3 !== null && v3 !== undefined) {
 					this.value += v3;
 				}
 			}
-			/*jslint eqeqeq: true */
 		} else {
 			this.value.push.apply(
 				// Closure Compiler type cast

File duel/dueljs/target/duel.min.js

 ":"+v(a.getUTCSeconds())+" Z";return""+a;case 0:return"";case 2:b=new n;for(var e=0,d=a.length;e<d;e++){if(c)b.append(", ");else c=true;b.append(A(a[e]))}return b.toString();case 3:b=new n;b.append("{");for(e in a)if(a.hasOwnProperty(e)){if(c)b.append(", ");else c=true;b.append(e,"=",A(a[e]))}b.append("}");return b.toString()}return a}function q(a){z(a)||(a=["",a]);this.value=a}function s(a,b){switch(j(b)){case 2:if(b[0]==="")for(var c=1,e=b.length;c<e;c++)s(a,b[c]);else a.push(b);break;case 3:c=
 a[1];if(j(c)===3)for(e in b){if(b.hasOwnProperty(e))c[e]=b[e]}else a.splice(1,0,b);break;case 4:c=a.length-1;if(c>0&&j(a[c])===4)a[c]=""+a[c]+b;else b!==""&&a.push(""+b);break;case 0:break;default:a.push(b)}}function t(a,b,c,e,d,f){var h=j(a[1])===3;if(a.length===(h?3:2))return l(a[a.length-1],b,c,e,d,f);var g=[""];h=h?2:1;for(var i=a.length;h<i;h++)s(g,l(a[h],b,c,e,d,f));return g}function D(a,b,c,e,d,f){for(var h=1,g=a.length;h<g;h++){var i=a[h],k=i[1].test;if(j(i[1])===3&&k){if(p(k))k=k(b,c,e,d);
 if(!k)continue}return t(i,b,c,e,d,f)}return null}function M(a){if(j(a)!==2)a=["",a];var b=function(c){try{var e=l(a,c,0,1,null);return new q(e)}catch(d){return new q("["+d+"]")}};b.getView=function(){return a};return b}function N(a){if(typeof a!=="string")return a;return a.replace(/[&<>]/g,function(b){switch(b){case "&":return"&amp;";case "<":return"&lt;";case ">":return"&gt;";default:return b}})}function O(a){if(typeof a!=="string")return a;return a.replace(/[&<>"]/g,function(b){switch(b){case "&":return"&amp;";
-case "<":return"&lt;";case ">":return"&gt;";case '"':return"&quot;";default:return b}})}function E(a,b){var c=b[0]||"",e=b.length,d=1,f,h=P[c];if(c.charAt(0)==="!")b[0]==="!DOCTYPE"?a.append("<!DOCTYPE ",b[1],">"):a.append("<!--",b[1],"--\>");else{if(c){a.append("<",c);f=b[d];if(j(f)===3){for(var g in f)if(f.hasOwnProperty(g)){a.append(" ",g);var i=f[g];j(i)!==0&&a.append('="',O(i),'"')}d++}h&&a.append(" /");a.append(">")}for(;d<e;d++){f=b[d];z(f)?E(a,f):a.append(N(f))}c&&!h&&a.append("</",c,">")}}
+case "<":return"&lt;";case ">":return"&gt;";case '"':return"&quot;";default:return b}})}function E(a,b){var c=b[0]||"",e=b.length,d=1,f,h=P[c];if(c.charAt(0)==="!")b[0]==="!DOCTYPE"?a.append("<!DOCTYPE ",b[1],">"):a.append("<\!--",b[1],"--\>");else{if(c){a.append("<",c);f=b[d];if(j(f)===3){for(var g in f)if(f.hasOwnProperty(g)){a.append(" ",g);var i=f[g];j(i)!==0&&a.append('="',O(i),'"')}d++}h&&a.append(" /");a.append(">")}for(;d<e;d++){f=b[d];z(f)?E(a,f):a.append(N(f))}c&&!h&&a.append("</",c,">")}}
 function F(a){try{var b=new n;E(b,a);return b.toString()}catch(c){return"["+c+"]"}}function r(a){if(a){if(a.charAt(0)==="!")return m.createComment(a==="!"?"":a.substr(1)+" ")}else{if(m.createDocumentFragment)return m.createDocumentFragment();a=""}if(a.toLowerCase()==="style"&&m.createStyleSheet)return m.createStyleSheet();return m.createElement(a)}function w(a,b){if(b){var c=(a.tagName||"").toLowerCase();if(a.nodeType===8){if(b.nodeType===3)a.nodeValue+=b.nodeValue}else if(c==="table"&&a.tBodies)if(b.tagName)if((c=
 b.tagName.toLowerCase())&&c!=="tbody"&&c!=="thead"){var e=a.tBodies.length>0?a.tBodies[a.tBodies.length-1]:null;if(!e){e=r(c==="th"?"thead":"tbody");a.appendChild(e)}e.appendChild(b)}else a.canHaveChildren!==false&&a.appendChild(b);else{if(b.nodeType===11)for(;b.firstChild;)w(a,b.removeChild(b.firstChild))}else if(c==="style"&&m.createStyleSheet)a.cssText=b;else if(a.canHaveChildren!==false)a.appendChild(b);else if(c==="object"&&b.tagName&&b.tagName.toLowerCase()==="param"){try{a.appendChild(b)}catch(d){}try{if(a.object)a.object[b.name]=
 b.value}catch(f){}}}}function G(a,b,c){if(typeof c==="string")c=new Function("event",c);if(p(c))a[b]=c}function H(a,b){if(b.name&&m.attachEvent&&!a.parentNode)try{var c=r("<"+a.tagName+" name='"+b.name+"'>");if(a.tagName===c.tagName)a=c}catch(e){}for(var d in b)if(b.hasOwnProperty(d)){c=b[d];var f=j(c);if(d){if(f===0){c="";f=4}d=Q[d.toLowerCase()]||d;if(d==="style")if(typeof a.style.cssText!=="undefined")a.style.cssText=c;else a.style=c;else if(d==="class")a.className=c;else if(R[d]){G(a,d,c);u[d]&&
 G(a,u[d],c)}else if(f===4){a.setAttribute(d,c);u[d]&&a.setAttribute(u[d],c)}else{a[d]=c;if(u[d])a[u[d]]=c}}}return a}function I(a){return!!a&&a.nodeType===3&&(!a.nodeValue||!/\S/.exec(a.nodeValue))}function J(a,b){if(a&&a.nodeType===3&&b.exec(a.nodeValue))a.nodeValue=a.nodeValue.replace(b,"")}function B(a){if(a){for(;I(a.firstChild);)a.removeChild(a.firstChild);for(J(a.firstChild,S);I(a.lastChild);)a.removeChild(a.lastChild);J(a.lastChild,T)}}function K(a,b){var c=a[b];if(c){try{delete a[b]}catch(e){a[b]=
 undefined}if(!p(c))try{c=new Function(""+c)}catch(d){c=null}}return c}function L(a){if(a){var b=K(a,"$init");b&&b.call(a);if(b=K(a,"$load"))setTimeout(function(){b.call(a);b=a=null},0);else b=a=null}}function C(a,b){for(var c=1,e=b.length;c<e;c++){var d=b[c];switch(j(d)){case 2:var f=d[0];d=C(r(f),d);if(f==="html"){B(d);L(d);return d}w(a,d);break;case 4:d!==""&&w(a,m.createTextNode(""+d));break;case 3:if(a.nodeType===1)a=H(a,d);break;case 5:f=w;var h=a;var g=d;d=r("div");d.innerHTML=""+g;B(d);if(d.childNodes.length===
-1)d=d.firstChild;else{for(g=r("");d.firstChild;)g.appendChild(d.firstChild);d=g}f(h,d)}}B(a);L(a);if(a.nodeType===11&&a.childNodes.length===1)a=a.firstChild;return a}var m=x.document;y.prototype.toString=function(){return this.value};var z=Array.isArray||function(a){return a instanceof Array};n.FAST=!x.ScriptEngineMajorVersion;n.prototype.append=function(a,b,c){if(n.FAST){this.value+=a;if(b!=null){this.value+=b;if(c!=null)this.value+=c}}else this.value.push.apply(this.value,arguments)};n.prototype.clear=
-function(){this.value=n.FAST?"":[]};n.prototype.toString=function(){return n.FAST?this.value:this.value.join("")};var l;l=function(a,b,c,e,d,f){switch(j(a)){case 1:return A(a(b,c,e,d));case 2:var h=a[0]||"";switch(h){case "$for":a:{var g=a[1]||{};h=[""];var i;if(g.hasOwnProperty("count")){i=g.count;if(p(i))i=i(b,c,e,d);if(g.hasOwnProperty("data")){g=g.data;if(p(g))g=g(b,c,e,d)}else g=b;for(b=0;b<i;b++)s(h,t(a,g,b,i,null,f))}else{if(g.hasOwnProperty("in")){var k=g["in"];if(p(k))k=k(b,c,e,d);if(j(k)===
-3){g=[];for(i in k)k.hasOwnProperty(i)&&g.push(i);b=0;for(i=g.length;b<i;b++)s(h,t(a,k[g[b]],b,i,g[b],f));a=h;break a}g=k}else{g=g.each;if(p(g))g=g(b,c,e,d)}b=j(g);if(b===2){b=0;for(i=g.length;b<i;b++)s(h,t(a,g[b],b,i,null,f))}else if(b!==0)h=t(a,g,0,1,null,f)}a=h}return a;case "$xor":return D(a,b,c,e,d,f);case "$if":return D(["$xor",a],b,c,e,d,f);case "$call":f=a[1]||{};if(f.view){h=l(f.view,b,c,e,d);g=f.hasOwnProperty("data")?l(f.data,b,c,e,d):b;i=f.hasOwnProperty("index")?l(f.index,b,c,e,d):c;
-k=f.hasOwnProperty("count")?l(f.count,b,c,e,d):e;b=f.hasOwnProperty("key")?l(f.key,b,c,e,d):d;c={};for(e=a.length-1;e>=2;e--){d=a[e];f=d[1]||{};if(f.hasOwnProperty("name"))c[f.name]=d}a=h&&p(h.getView)?l(h.getView(),g,i,k,b,c):null}else a=null;return a;case "$part":h=(a[1]||{}).name||"";h=f&&f.hasOwnProperty(h)?f[h]:a;return t(h,b,c,e,d)}h=[h];g=1;for(i=a.length;g<i;g++)s(h,l(a[g],b,c,e,d,f));return h;case 3:f={};for(h in a)if(a.hasOwnProperty(h))f[h]=l(a[h],b,c,e,d);return f}return a};var o=x.duel=
-function(a){return p(a)&&p(a.getView)?a:M(a)};o.raw=o.raw=function(a){return new y(a)};var P={area:true,base:true,basefont:true,br:true,col:true,frame:true,hr:true,img:true,input:true,isindex:true,keygen:true,link:true,meta:true,param:true,source:true,wbr:true};q.prototype.toString=function(){return F(this.value)};o.write=o.write=function(a,b,c,e,d){a=o(a).getView();a=l(a,b,c,e,d);m.write(F(a))};var Q={rowspan:"rowSpan",colspan:"colSpan",cellpadding:"cellPadding",cellspacing:"cellSpacing",tabindex:"tabIndex",
-accesskey:"accessKey",hidefocus:"hideFocus",usemap:"useMap",maxlength:"maxLength",readonly:"readOnly",contenteditable:"contentEditable"},u={enctype:"encoding",onscroll:"DOMMouseScroll"},R={onblur:true,onchange:true,onclick:true,ondblclick:true,onerror:true,onfocus:true,onkeydown:true,onkeypress:true,onkeyup:true,onload:true,onmousedown:true,onmouseenter:true,onmouseleave:true,onmousemove:true,onmouseout:true,onmouseover:true,onmouseup:true,onresize:true,onscroll:true,onselect:true,onsubmit:true,onunload:true},
-S=/^[\r\n]+/,T=/[\r\n]+$/;q.prototype.toDOM=q.prototype.toDOM=function(){try{return C(r(this.value[0]),this.value)}catch(a){return m.createTextNode("["+a+"]")}};q.prototype.reload=q.prototype.reload=function(){var a=m;try{var b=this.toDOM();a.replaceChild(b,a.documentElement);if(a.createStyleSheet){for(var c=b.firstChild;c&&(c.tagName||"")!=="HEAD";)c=c.nextSibling;for(var e=c&&c.firstChild;e;){if((e.tagName||"")==="LINK")e.href=e.href;e=e.nextSibling}}}catch(d){a=a.open("text/html");a.write(this.toString());
-a.close()}};o.attr=o.attr=function(a,b,c,e,d,f){if(j(a)===4)a=m.getElementById(a);if(a){b=l(b,c,e,d,f);H(a,b)}};o.replace=o.replace=function(a,b,c,e,d,f){if(j(a)===4)a=m.getElementById(a);if(a&&a.parentNode){b=o(b).getView();b=l(b,c,e,d,f);try{b=C(r(b[0]),b)}catch(h){b=m.createTextNode("["+h+"]")}a.parentNode.replaceChild(b,a)}};return o}(window);
+1)d=d.firstChild;else{for(g=r("");d.firstChild;)g.appendChild(d.firstChild);d=g}f(h,d)}}B(a);L(a);if(a.nodeType===11&&a.childNodes.length===1)a=a.firstChild;return a}var m=x.document;y.prototype.toString=function(){return this.value};var z=Array.isArray||function(a){return a instanceof Array};n.FAST=!x.ScriptEngineMajorVersion;n.prototype.append=function(a,b,c){if(n.FAST){this.value+=a;if(b!==null&&b!==undefined){this.value+=b;if(c!==null&&c!==undefined)this.value+=c}}else this.value.push.apply(this.value,
+arguments)};n.prototype.clear=function(){this.value=n.FAST?"":[]};n.prototype.toString=function(){return n.FAST?this.value:this.value.join("")};var l;l=function(a,b,c,e,d,f){switch(j(a)){case 1:return A(a(b,c,e,d));case 2:var h=a[0]||"";switch(h){case "$for":a:{var g=a[1]||{};h=[""];var i;if(g.hasOwnProperty("count")){i=g.count;if(p(i))i=i(b,c,e,d);if(g.hasOwnProperty("data")){g=g.data;if(p(g))g=g(b,c,e,d)}else g=b;for(b=0;b<i;b++)s(h,t(a,g,b,i,null,f))}else{if(g.hasOwnProperty("in")){var k=g["in"];
+if(p(k))k=k(b,c,e,d);if(j(k)===3){g=[];for(i in k)k.hasOwnProperty(i)&&g.push(i);b=0;for(i=g.length;b<i;b++)s(h,t(a,k[g[b]],b,i,g[b],f));a=h;break a}g=k}else{g=g.each;if(p(g))g=g(b,c,e,d)}b=j(g);if(b===2){b=0;for(i=g.length;b<i;b++)s(h,t(a,g[b],b,i,null,f))}else if(b!==0)h=t(a,g,0,1,null,f)}a=h}return a;case "$xor":return D(a,b,c,e,d,f);case "$if":return D(["$xor",a],b,c,e,d,f);case "$call":f=a[1]||{};if(f.view){h=l(f.view,b,c,e,d);g=f.hasOwnProperty("data")?l(f.data,b,c,e,d):b;i=f.hasOwnProperty("index")?
+l(f.index,b,c,e,d):c;k=f.hasOwnProperty("count")?l(f.count,b,c,e,d):e;b=f.hasOwnProperty("key")?l(f.key,b,c,e,d):d;c={};for(e=a.length-1;e>=2;e--){d=a[e];f=d[1]||{};if(f.hasOwnProperty("name"))c[f.name]=d}a=h&&p(h.getView)?l(h.getView(),g,i,k,b,c):null}else a=null;return a;case "$part":h=(a[1]||{}).name||"";h=f&&f.hasOwnProperty(h)?f[h]:a;return t(h,b,c,e,d)}h=[h];g=1;for(i=a.length;g<i;g++)s(h,l(a[g],b,c,e,d,f));return h;case 3:f={};for(h in a)if(a.hasOwnProperty(h))f[h]=l(a[h],b,c,e,d);return f}return a};
+var o=x.duel=function(a){return p(a)&&p(a.getView)?a:M(a)};o.raw=o.raw=function(a){return new y(a)};var P={area:true,base:true,basefont:true,br:true,col:true,frame:true,hr:true,img:true,input:true,isindex:true,keygen:true,link:true,meta:true,param:true,source:true,wbr:true};q.prototype.toString=function(){return F(this.value)};o.write=o.write=function(a,b,c,e,d){a=o(a).getView();a=l(a,b,c,e,d);m.write(F(a))};var Q={rowspan:"rowSpan",colspan:"colSpan",cellpadding:"cellPadding",cellspacing:"cellSpacing",
+tabindex:"tabIndex",accesskey:"accessKey",hidefocus:"hideFocus",usemap:"useMap",maxlength:"maxLength",readonly:"readOnly",contenteditable:"contentEditable"},u={enctype:"encoding",onscroll:"DOMMouseScroll"},R={onblur:true,onchange:true,onclick:true,ondblclick:true,onerror:true,onfocus:true,onkeydown:true,onkeypress:true,onkeyup:true,onload:true,onmousedown:true,onmouseenter:true,onmouseleave:true,onmousemove:true,onmouseout:true,onmouseover:true,onmouseup:true,onresize:true,onscroll:true,onselect:true,
+onsubmit:true,onunload:true},S=/^[\r\n]+/,T=/[\r\n]+$/;q.prototype.toDOM=q.prototype.toDOM=function(){try{return C(r(this.value[0]),this.value)}catch(a){return m.createTextNode("["+a+"]")}};q.prototype.reload=q.prototype.reload=function(){var a=m;try{var b=this.toDOM();a.replaceChild(b,a.documentElement);if(a.createStyleSheet){for(var c=b.firstChild;c&&(c.tagName||"")!=="HEAD";)c=c.nextSibling;for(var e=c&&c.firstChild;e;){if((e.tagName||"")==="LINK")e.href=e.href;e=e.nextSibling}}}catch(d){a=a.open("text/html");
+a.write(this.toString());a.close()}};o.attr=o.attr=function(a,b,c,e,d,f){if(j(a)===4)a=m.getElementById(a);if(a){b=l(b,c,e,d,f);H(a,b)}};o.replace=o.replace=function(a,b,c,e,d,f){if(j(a)===4)a=m.getElementById(a);if(a&&a.parentNode){b=o(b).getView();b=l(b,c,e,d,f);try{b=C(r(b[0]),b)}catch(h){b=m.createTextNode("["+h+"]")}a.parentNode.replaceChild(b,a)}};return o}(window);