1&&(e.result+=Y.repeat("\n",t-1))}function b(e,t,a){var s,u,c,l,p,f,d,m,g,y=e.kind,b=e.result;if(g=e.input.charCodeAt(e.position),r(g)||o(g)||35===g||38===g||42===g||33===g||124===g||62===g||39===g||34===g||37===g||64===g||96===g)return!1;if((63===g||45===g)&&(u=e.input.charCodeAt(e.position+1),r(u)||a&&o(u)))return!1;for(e.kind="scalar",e.result="",c=l=e.position,p=!1;0!==g;){if(58===g){if(u=e.input.charCodeAt(e.position+1),r(u)||a&&o(u))break}else if(35===g){if(s=e.input.charCodeAt(e.position-1),r(s))break}else{if(e.position===e.lineStart&&v(e)||a&&o(g))break;if(n(g)){if(f=e.line,d=e.lineStart,m=e.lineIndent,x(e,!1,-1),e.lineIndent>=t){p=!0,g=e.input.charCodeAt(e.position);continue}e.position=l,e.line=f,e.lineStart=d,e.lineIndent=m;break}}p&&(h(e,c,l,!1),A(e,e.line-f),c=l=e.position,p=!1),i(g)||(l=e.position+1),g=e.input.charCodeAt(++e.position)}return h(e,c,l,!1),e.result?!0:(e.kind=y,e.result=b,!1)}function w(e,t){var i,r,o;if(i=e.input.charCodeAt(e.position),39!==i)return!1;for(e.kind="scalar",e.result="",e.position++,r=o=e.position;0!==(i=e.input.charCodeAt(e.position));)if(39===i){if(h(e,r,e.position,!0),i=e.input.charCodeAt(++e.position),39!==i)return!0;r=o=e.position,e.position++}else n(i)?(h(e,r,o,!0),A(e,x(e,!1,t)),r=o=e.position):e.position===e.lineStart&&v(e)?f(e,"unexpected end of the document within a single quoted scalar"):(e.position++,o=e.position);f(e,"unexpected end of the stream within a single quoted scalar")}function C(e,t){var i,r,o,u,c,l;if(l=e.input.charCodeAt(e.position),34!==l)return!1;for(e.kind="scalar",e.result="",e.position++,i=r=e.position;0!==(l=e.input.charCodeAt(e.position));){if(34===l)return h(e,i,e.position,!0),e.position++,!0;if(92===l){if(h(e,i,e.position,!0),l=e.input.charCodeAt(++e.position),n(l))x(e,!1,t);else if(256>l&&nt[l])e.result+=it[l],e.position++;else if((c=s(l))>0){for(o=c,u=0;o>0;o--)l=e.input.charCodeAt(++e.position),(c=a(l))>=0?u=(u<<4)+c:f(e,"expected hexadecimal character");e.result+=String.fromCharCode(u),e.position++}else f(e,"unknown escape sequence");i=r=e.position}else n(l)?(h(e,i,r,!0),A(e,x(e,!1,t)),i=r=e.position):e.position===e.lineStart&&v(e)?f(e,"unexpected end of the document within a double quoted scalar"):(e.position++,r=e.position)}f(e,"unexpected end of the stream within a double quoted scalar")}function k(e,t){var n,i,o,a,s,u,c,l,p,d,h,m=!0,y=e.tag,v=e.anchor;if(h=e.input.charCodeAt(e.position),91===h)a=93,c=!1,i=[];else{if(123!==h)return!1;a=125,c=!0,i={}}for(null!==e.anchor&&(e.anchorMap[e.anchor]=i),h=e.input.charCodeAt(++e.position);0!==h;){if(x(e,!0,t),h=e.input.charCodeAt(e.position),h===a)return e.position++,e.tag=y,e.anchor=v,e.kind=c?"mapping":"sequence",e.result=i,!0;m||f(e,"missed comma between flow collection entries"),p=l=d=null,s=u=!1,63===h&&(o=e.input.charCodeAt(e.position+1),r(o)&&(s=u=!0,e.position++,x(e,!0,t))),n=e.line,N(e,t,B,!1,!0),p=e.tag,l=e.result,x(e,!0,t),h=e.input.charCodeAt(e.position),!u&&e.line!==n||58!==h||(s=!0,h=e.input.charCodeAt(++e.position),x(e,!0,t),N(e,t,B,!1,!0),d=e.result),c?g(e,i,p,l,d):i.push(s?g(e,null,p,l,d):l),x(e,!0,t),h=e.input.charCodeAt(e.position),44===h?(m=!0,h=e.input.charCodeAt(++e.position)):m=!1}f(e,"unexpected end of the stream within a flow collection")}function j(e,t){var r,o,a,s,c=Z,l=!1,p=t,d=0,m=!1;if(s=e.input.charCodeAt(e.position),124===s)o=!1;else{if(62!==s)return!1;o=!0}for(e.kind="scalar",e.result="";0!==s;)if(s=e.input.charCodeAt(++e.position),43===s||45===s)Z===c?c=43===s?z:J:f(e,"repeat of a chomping mode identifier");else{if(!((a=u(s))>=0))break;0===a?f(e,"bad explicit indentation width of a block scalar; it cannot be less than one"):l?f(e,"repeat of an indentation width identifier"):(p=t+a-1,l=!0)}if(i(s)){do s=e.input.charCodeAt(++e.position);while(i(s));if(35===s)do s=e.input.charCodeAt(++e.position);while(!n(s)&&0!==s)}for(;0!==s;){for(y(e),e.lineIndent=0,s=e.input.charCodeAt(e.position);(!l||e.lineIndentp&&(p=e.lineIndent),n(s))d++;else{if(e.lineIndent
t)&&0!==o)f(e,"bad indentation of a sequence entry");else if(e.lineIndentt)&&(N(e,t,W,!0,a)&&(y?h=e.result:m=e.result),y||(g(e,p,d,h,m),d=h=m=null),x(e,!0,-1),u=e.input.charCodeAt(e.position)),e.lineIndent>t&&0!==u)f(e,"bad indentation of a mapping entry");else if(e.lineIndentt?m=1:e.lineIndent===t?m=0:e.lineIndentt?m=1:e.lineIndent===t?m=0:e.lineIndentu;u+=1)if(l=e.implicitTypes[u],l.resolve(e.result)){e.result=l.construct(e.result),e.tag=l.tag,null!==e.anchor&&(e.anchorMap[e.anchor]=e.result);break}}else $.call(e.typeMap,e.tag)?(l=e.typeMap[e.tag],null!==e.result&&l.kind!==e.kind&&f(e,"unacceptable node kind for !<"+e.tag+'> tag; it should be "'+l.kind+'", not "'+e.kind+'"'),l.resolve(e.result)?(e.result=l.construct(e.result),null!==e.anchor&&(e.anchorMap[e.anchor]=e.result)):f(e,"cannot resolve a node with !<"+e.tag+"> explicit tag")):d(e,"unknown tag !<"+e.tag+">");return null!==e.tag||null!==e.anchor||y}function _(e){var t,o,a,s,u=e.position,c=!1;for(e.version=null,e.checkLineBreaks=e.legacy,e.tagMap={},e.anchorMap={};0!==(s=e.input.charCodeAt(e.position))&&(x(e,!0,-1),s=e.input.charCodeAt(e.position),!(e.lineIndent>0||37!==s));){for(c=!0,s=e.input.charCodeAt(++e.position),t=e.position;0!==s&&!r(s);)s=e.input.charCodeAt(++e.position);for(o=e.input.slice(t,e.position),a=[],o.length<1&&f(e,"directive name must not be less than one character in length");0!==s;){for(;i(s);)s=e.input.charCodeAt(++e.position);if(35===s){do s=e.input.charCodeAt(++e.position);while(0!==s&&!n(s));break}if(n(s))break;for(t=e.position;0!==s&&!r(s);)s=e.input.charCodeAt(++e.position);a.push(e.input.slice(t,e.position))}0!==s&&y(e),$.call(ot,o)?ot[o](e,o,a):d(e,'unknown document directive "'+o+'"')}return x(e,!0,-1),0===e.lineIndent&&45===e.input.charCodeAt(e.position)&&45===e.input.charCodeAt(e.position+1)&&45===e.input.charCodeAt(e.position+2)?(e.position+=3,x(e,!0,-1)):c&&f(e,"directives end mark is expected"),N(e,e.lineIndent-1,W,!1,!0),x(e,!0,-1),e.checkLineBreaks&&Q.test(e.input.slice(u,e.position))&&d(e,"non-ASCII line breaks are interpreted as content"),e.documents.push(e.result),e.position===e.lineStart&&v(e)?void(46===e.input.charCodeAt(e.position)&&(e.position+=3,x(e,!0,-1))):void(e.positioni;i+=1)t(o[i])}function L(e,t){var n=T(e,t);if(0===n.length)return void 0;if(1===n.length)return n[0];throw new q("expected a single document in the stream, but found more")}function D(e,t,n){M(e,t,Y.extend({schema:R},n))}function U(e,t){return L(e,Y.extend({schema:R},t))}for(var Y=e("./common"),q=e("./exception"),P=e("./mark"),R=e("./schema/default_safe"),H=e("./schema/default_full"),$=Object.prototype.hasOwnProperty,B=1,G=2,V=3,W=4,Z=1,J=2,z=3,K=/[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uD800-\uDFFF\uFFFE\uFFFF]/,Q=/[\x85\u2028\u2029]/,X=/[,\[\]\{\}]/,et=/^(?:!|!!|![a-z\-]+!)$/i,tt=/^(?:!|[^,\[\]\{\}])(?:%[0-9a-f]{2}|[0-9a-z\-#;\/\?:@&=\+\$,_\.!~\*'\(\)\[\]])*$/i,nt=new Array(256),it=new Array(256),rt=0;256>rt;rt++)nt[rt]=c(rt)?1:0,it[rt]=c(rt);var ot={YAML:function(e,t,n){var i,r,o;null!==e.version&&f(e,"duplication of %YAML directive"),1!==n.length&&f(e,"YAML directive accepts exactly one argument"),i=/^([0-9]+)\.([0-9]+)$/.exec(n[0]),null===i&&f(e,"ill-formed argument of the YAML directive"),r=parseInt(i[1],10),o=parseInt(i[2],10),1!==r&&f(e,"unacceptable YAML version of the document"),e.version=n[0],e.checkLineBreaks=2>o,1!==o&&2!==o&&d(e,"unsupported YAML version of the document")},TAG:function(e,t,n){var i,r;2!==n.length&&f(e,"TAG directive accepts exactly two arguments"),i=n[0],r=n[1],et.test(i)||f(e,"ill-formed tag handle (first argument) of the TAG directive"),$.call(e.tagMap,i)&&f(e,'there is a previously declared suffix for "'+i+'" tag handle'),tt.test(r)||f(e,"ill-formed tag prefix (second argument) of the TAG directive"),e.tagMap[i]=r}};t.exports.loadAll=M,t.exports.load=L,t.exports.safeLoadAll=D,t.exports.safeLoad=U},{"./common":2,"./exception":4,"./mark":6,"./schema/default_full":9,"./schema/default_safe":10}],6:[function(e,t){"use strict";function n(e,t,n,i,r){this.name=e,this.buffer=t,this.position=n,this.line=i,this.column=r}var i=e("./common");n.prototype.getSnippet=function(e,t){var n,r,o,a,s;if(!this.buffer)return null;for(e=e||4,t=t||75,n="",r=this.position;r>0&&-1==="\x00\r\n
\u2028\u2029".indexOf(this.buffer.charAt(r-1));)if(r-=1,this.position-r>t/2-1){n=" ... ",r+=5;break}for(o="",a=this.position;at/2-1){o=" ... ",a-=5;break}return s=this.buffer.slice(r,a),i.repeat(" ",e)+n+s+o+"\n"+i.repeat(" ",e+this.position-r+n.length)+"^"},n.prototype.toString=function(e){var t,n="";return this.name&&(n+='in "'+this.name+'" '),n+="at line "+(this.line+1)+", column "+(this.column+1),e||(t=this.getSnippet(),t&&(n+=":\n"+t)),n},t.exports=n},{"./common":2}],7:[function(e,t){"use strict";function n(e,t,i){var r=[];return e.include.forEach(function(e){i=n(e,t,i)}),e[t].forEach(function(e){i.forEach(function(t,n){t.tag===e.tag&&r.push(n)}),i.push(e)}),i.filter(function(e,t){return-1===r.indexOf(t)})}function i(){function e(e){i[e.tag]=e}var t,n,i={};for(t=0,n=arguments.length;n>t;t+=1)arguments[t].forEach(e);return i}function r(e){this.include=e.include||[],this.implicit=e.implicit||[],this.explicit=e.explicit||[],this.implicit.forEach(function(e){if(e.loadKind&&"scalar"!==e.loadKind)throw new a("There is a non-scalar type in the implicit list of a schema. Implicit resolving of such types is not supported.")}),this.compiledImplicit=n(this,"implicit",[]),this.compiledExplicit=n(this,"explicit",[]),this.compiledTypeMap=i(this.compiledImplicit,this.compiledExplicit)}var o=e("./common"),a=e("./exception"),s=e("./type");r.DEFAULT=null,r.create=function(){var e,t;switch(arguments.length){case 1:e=r.DEFAULT,t=arguments[0];break;case 2:e=arguments[0],t=arguments[1];break;default:throw new a("Wrong number of arguments for Schema.create function")}if(e=o.toArray(e),t=o.toArray(t),!e.every(function(e){return e instanceof r}))throw new a("Specified list of super schemas (or a single Schema object) contains a non-Schema object.");if(!t.every(function(e){return e instanceof s}))throw new a("Specified list of YAML types (or a single Type object) contains a non-Type object.");return new r({include:e,explicit:t})},t.exports=r},{"./common":2,"./exception":4,"./type":13}],8:[function(e,t){"use strict";var n=e("../schema");t.exports=new n({include:[e("./json")]})},{"../schema":7,"./json":12}],9:[function(e,t){"use strict";var n=e("../schema");t.exports=n.DEFAULT=new n({include:[e("./default_safe")],explicit:[e("../type/js/undefined"),e("../type/js/regexp"),e("../type/js/function")]})},{"../schema":7,"../type/js/function":18,"../type/js/regexp":19,"../type/js/undefined":20,"./default_safe":10}],10:[function(e,t){"use strict";var n=e("../schema");t.exports=new n({include:[e("./core")],implicit:[e("../type/timestamp"),e("../type/merge")],explicit:[e("../type/binary"),e("../type/omap"),e("../type/pairs"),e("../type/set")]})},{"../schema":7,"../type/binary":14,"../type/merge":22,"../type/omap":24,"../type/pairs":25,"../type/set":27,"../type/timestamp":29,"./core":8}],11:[function(e,t){"use strict";var n=e("../schema");t.exports=new n({explicit:[e("../type/str"),e("../type/seq"),e("../type/map")]})},{"../schema":7,"../type/map":21,"../type/seq":26,"../type/str":28}],12:[function(e,t){"use strict";var n=e("../schema");t.exports=new n({include:[e("./failsafe")],implicit:[e("../type/null"),e("../type/bool"),e("../type/int"),e("../type/float")]})},{"../schema":7,"../type/bool":15,"../type/float":16,"../type/int":17,"../type/null":23,"./failsafe":11}],13:[function(e,t){"use strict";function n(e){var t={};return null!==e&&Object.keys(e).forEach(function(n){e[n].forEach(function(e){t[String(e)]=n})}),t}function i(e,t){if(t=t||{},Object.keys(t).forEach(function(t){if(-1===o.indexOf(t))throw new r('Unknown option "'+t+'" is met in definition of "'+e+'" YAML type.')}),this.tag=e,this.kind=t.kind||null,this.resolve=t.resolve||function(){return!0},this.construct=t.construct||function(e){return e},this.instanceOf=t.instanceOf||null,this.predicate=t.predicate||null,this.represent=t.represent||null,this.defaultStyle=t.defaultStyle||null,this.styleAliases=n(t.styleAliases||null),-1===a.indexOf(this.kind))throw new r('Unknown kind "'+this.kind+'" is specified for "'+e+'" YAML type.')}var r=e("./exception"),o=["kind","resolve","construct","instanceOf","predicate","represent","defaultStyle","styleAliases"],a=["scalar","sequence","mapping"];t.exports=i},{"./exception":4}],14:[function(e,t){"use strict";function n(e){if(null===e)return!1;var t,n,i=0,r=e.length,o=u;for(n=0;r>n;n++)if(t=o.indexOf(e.charAt(n)),!(t>64)){if(0>t)return!1;i+=6}return i%8===0}function i(e){var t,n,i=e.replace(/[\r\n=]/g,""),r=i.length,o=u,s=0,c=[];for(t=0;r>t;t++)t%4===0&&t&&(c.push(s>>16&255),c.push(s>>8&255),c.push(255&s)),s=s<<6|o.indexOf(i.charAt(t));return n=r%4*6,0===n?(c.push(s>>16&255),c.push(s>>8&255),c.push(255&s)):18===n?(c.push(s>>10&255),c.push(s>>2&255)):12===n&&c.push(s>>4&255),a?new a(c):c}function r(e){var t,n,i="",r=0,o=e.length,a=u;for(t=0;o>t;t++)t%3===0&&t&&(i+=a[r>>18&63],i+=a[r>>12&63],i+=a[r>>6&63],i+=a[63&r]),r=(r<<8)+e[t];return n=o%3,0===n?(i+=a[r>>18&63],i+=a[r>>12&63],i+=a[r>>6&63],i+=a[63&r]):2===n?(i+=a[r>>10&63],i+=a[r>>4&63],i+=a[r<<2&63],i+=a[64]):1===n&&(i+=a[r>>2&63],i+=a[r<<4&63],i+=a[64],i+=a[64]),i}function o(e){return a&&a.isBuffer(e)}var a=e("buffer").Buffer,s=e("../type"),u="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=\n\r";t.exports=new s("tag:yaml.org,2002:binary",{kind:"scalar",resolve:n,construct:i,predicate:o,represent:r})},{"../type":13,buffer:30}],15:[function(e,t){"use strict";function n(e){if(null===e)return!1;var t=e.length;return 4===t&&("true"===e||"True"===e||"TRUE"===e)||5===t&&("false"===e||"False"===e||"FALSE"===e)}function i(e){return"true"===e||"True"===e||"TRUE"===e}function r(e){return"[object Boolean]"===Object.prototype.toString.call(e)}var o=e("../type");t.exports=new o("tag:yaml.org,2002:bool",{kind:"scalar",resolve:n,construct:i,predicate:r,represent:{lowercase:function(e){return e?"true":"false"},uppercase:function(e){return e?"TRUE":"FALSE"},camelcase:function(e){return e?"True":"False"}},defaultStyle:"lowercase"})},{"../type":13}],16:[function(e,t){"use strict";function n(e){if(null===e)return!1;return u.test(e)?!0:!1}function i(e){var t,n,i,r;return t=e.replace(/_/g,"").toLowerCase(),n="-"===t[0]?-1:1,r=[],0<="+-".indexOf(t[0])&&(t=t.slice(1)),".inf"===t?1===n?Number.POSITIVE_INFINITY:Number.NEGATIVE_INFINITY:".nan"===t?0/0:0<=t.indexOf(":")?(t.split(":").forEach(function(e){r.unshift(parseFloat(e,10))}),t=0,i=1,r.forEach(function(e){t+=e*i,i*=60}),n*t):n*parseFloat(t,10)}function r(e,t){if(isNaN(e))switch(t){case"lowercase":return".nan";case"uppercase":return".NAN";case"camelcase":return".NaN"}else if(Number.POSITIVE_INFINITY===e)switch(t){case"lowercase":return".inf";case"uppercase":return".INF";case"camelcase":return".Inf"}else{if(Number.NEGATIVE_INFINITY!==e)return a.isNegativeZero(e)?"-0.0":e.toString(10);switch(t){case"lowercase":return"-.inf";case"uppercase":return"-.INF";case"camelcase":return"-.Inf"}}}function o(e){return"[object Number]"===Object.prototype.toString.call(e)&&(0!==e%1||a.isNegativeZero(e))}var a=e("../common"),s=e("../type"),u=new RegExp("^(?:[-+]?(?:[0-9][0-9_]*)\\.[0-9_]*(?:[eE][-+][0-9]+)?|\\.[0-9_]+(?:[eE][-+][0-9]+)?|[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+\\.[0-9_]*|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$");t.exports=new s("tag:yaml.org,2002:float",{kind:"scalar",resolve:n,construct:i,predicate:o,represent:r,defaultStyle:"lowercase"})},{"../common":2,"../type":13}],17:[function(e,t){"use strict";function n(e){return e>=48&&57>=e||e>=65&&70>=e||e>=97&&102>=e}function i(e){return e>=48&&55>=e}function r(e){return e>=48&&57>=e}function o(e){if(null===e)return!1;var t,o=e.length,a=0,s=!1;if(!o)return!1;if(t=e[a],("-"===t||"+"===t)&&(t=e[++a]),"0"===t){if(a+1===o)return!0;if(t=e[++a],"b"===t){for(a++;o>a;a++)if(t=e[a],"_"!==t){if("0"!==t&&"1"!==t)return!1;s=!0}return s}if("x"===t){for(a++;o>a;a++)if(t=e[a],"_"!==t){if(!n(e.charCodeAt(a)))return!1;s=!0}return s}for(;o>a;a++)if(t=e[a],"_"!==t){if(!i(e.charCodeAt(a)))return!1;
+s=!0}return s}for(;o>a;a++)if(t=e[a],"_"!==t){if(":"===t)break;if(!r(e.charCodeAt(a)))return!1;s=!0}return s?":"!==t?!0:/^(:[0-5]?[0-9])+$/.test(e.slice(a)):!1}function a(e){var t,n,i=e,r=1,o=[];return-1!==i.indexOf("_")&&(i=i.replace(/_/g,"")),t=i[0],("-"===t||"+"===t)&&("-"===t&&(r=-1),i=i.slice(1),t=i[0]),"0"===i?0:"0"===t?"b"===i[1]?r*parseInt(i.slice(2),2):"x"===i[1]?r*parseInt(i,16):r*parseInt(i,8):-1!==i.indexOf(":")?(i.split(":").forEach(function(e){o.unshift(parseInt(e,10))}),i=0,n=1,o.forEach(function(e){i+=e*n,n*=60}),r*i):r*parseInt(i,10)}function s(e){return"[object Number]"===Object.prototype.toString.call(e)&&0===e%1&&!u.isNegativeZero(e)}var u=e("../common"),c=e("../type");t.exports=new c("tag:yaml.org,2002:int",{kind:"scalar",resolve:o,construct:a,predicate:s,represent:{binary:function(e){return"0b"+e.toString(2)},octal:function(e){return"0"+e.toString(8)},decimal:function(e){return e.toString(10)},hexadecimal:function(e){return"0x"+e.toString(16).toUpperCase()}},defaultStyle:"decimal",styleAliases:{binary:[2,"bin"],octal:[8,"oct"],decimal:[10,"dec"],hexadecimal:[16,"hex"]}})},{"../common":2,"../type":13}],18:[function(e,t){"use strict";function n(e){if(null===e)return!1;try{var t="("+e+")",n=a.parse(t,{range:!0});return"Program"!==n.type||1!==n.body.length||"ExpressionStatement"!==n.body[0].type||"FunctionExpression"!==n.body[0].expression.type?!1:!0}catch(i){return!1}}function i(e){var t,n="("+e+")",i=a.parse(n,{range:!0}),r=[];if("Program"!==i.type||1!==i.body.length||"ExpressionStatement"!==i.body[0].type||"FunctionExpression"!==i.body[0].expression.type)throw new Error("Failed to resolve function");return i.body[0].expression.params.forEach(function(e){r.push(e.name)}),t=i.body[0].expression.body.range,new Function(r,n.slice(t[0]+1,t[1]-1))}function r(e){return e.toString()}function o(e){return"[object Function]"===Object.prototype.toString.call(e)}var a;try{a=e("esprima")}catch(s){"undefined"!=typeof window&&(a=window.esprima)}var u=e("../../type");t.exports=new u("tag:yaml.org,2002:js/function",{kind:"scalar",resolve:n,construct:i,predicate:o,represent:r})},{"../../type":13,esprima:"esprima"}],19:[function(e,t){"use strict";function n(e){if(null===e)return!1;if(0===e.length)return!1;var t=e,n=/\/([gim]*)$/.exec(e),i="";if("/"===t[0]){if(n&&(i=n[1]),i.length>3)return!1;if("/"!==t[t.length-i.length-1])return!1;t=t.slice(1,t.length-i.length-1)}try{{new RegExp(t,i)}return!0}catch(r){return!1}}function i(e){var t=e,n=/\/([gim]*)$/.exec(e),i="";return"/"===t[0]&&(n&&(i=n[1]),t=t.slice(1,t.length-i.length-1)),new RegExp(t,i)}function r(e){var t="/"+e.source+"/";return e.global&&(t+="g"),e.multiline&&(t+="m"),e.ignoreCase&&(t+="i"),t}function o(e){return"[object RegExp]"===Object.prototype.toString.call(e)}var a=e("../../type");t.exports=new a("tag:yaml.org,2002:js/regexp",{kind:"scalar",resolve:n,construct:i,predicate:o,represent:r})},{"../../type":13}],20:[function(e,t){"use strict";function n(){return!0}function i(){return void 0}function r(){return""}function o(e){return"undefined"==typeof e}var a=e("../../type");t.exports=new a("tag:yaml.org,2002:js/undefined",{kind:"scalar",resolve:n,construct:i,predicate:o,represent:r})},{"../../type":13}],21:[function(e,t){"use strict";var n=e("../type");t.exports=new n("tag:yaml.org,2002:map",{kind:"mapping",construct:function(e){return null!==e?e:{}}})},{"../type":13}],22:[function(e,t){"use strict";function n(e){return"<<"===e||null===e}var i=e("../type");t.exports=new i("tag:yaml.org,2002:merge",{kind:"scalar",resolve:n})},{"../type":13}],23:[function(e,t){"use strict";function n(e){if(null===e)return!0;var t=e.length;return 1===t&&"~"===e||4===t&&("null"===e||"Null"===e||"NULL"===e)}function i(){return null}function r(e){return null===e}var o=e("../type");t.exports=new o("tag:yaml.org,2002:null",{kind:"scalar",resolve:n,construct:i,predicate:r,represent:{canonical:function(){return"~"},lowercase:function(){return"null"},uppercase:function(){return"NULL"},camelcase:function(){return"Null"}},defaultStyle:"lowercase"})},{"../type":13}],24:[function(e,t){"use strict";function n(e){if(null===e)return!0;var t,n,i,r,s,u=[],c=e;for(t=0,n=c.length;n>t;t+=1){if(i=c[t],s=!1,"[object Object]"!==a.call(i))return!1;for(r in i)if(o.call(i,r)){if(s)return!1;s=!0}if(!s)return!1;if(-1!==u.indexOf(r))return!1;u.push(r)}return!0}function i(e){return null!==e?e:[]}var r=e("../type"),o=Object.prototype.hasOwnProperty,a=Object.prototype.toString;t.exports=new r("tag:yaml.org,2002:omap",{kind:"sequence",resolve:n,construct:i})},{"../type":13}],25:[function(e,t){"use strict";function n(e){if(null===e)return!0;var t,n,i,r,a,s=e;for(a=new Array(s.length),t=0,n=s.length;n>t;t+=1){if(i=s[t],"[object Object]"!==o.call(i))return!1;if(r=Object.keys(i),1!==r.length)return!1;a[t]=[r[0],i[r[0]]]}return!0}function i(e){if(null===e)return[];var t,n,i,r,o,a=e;for(o=new Array(a.length),t=0,n=a.length;n>t;t+=1)i=a[t],r=Object.keys(i),o[t]=[r[0],i[r[0]]];return o}var r=e("../type"),o=Object.prototype.toString;t.exports=new r("tag:yaml.org,2002:pairs",{kind:"sequence",resolve:n,construct:i})},{"../type":13}],26:[function(e,t){"use strict";var n=e("../type");t.exports=new n("tag:yaml.org,2002:seq",{kind:"sequence",construct:function(e){return null!==e?e:[]}})},{"../type":13}],27:[function(e,t){"use strict";function n(e){if(null===e)return!0;var t,n=e;for(t in n)if(o.call(n,t)&&null!==n[t])return!1;return!0}function i(e){return null!==e?e:{}}var r=e("../type"),o=Object.prototype.hasOwnProperty;t.exports=new r("tag:yaml.org,2002:set",{kind:"mapping",resolve:n,construct:i})},{"../type":13}],28:[function(e,t){"use strict";var n=e("../type");t.exports=new n("tag:yaml.org,2002:str",{kind:"scalar",construct:function(e){return null!==e?e:""}})},{"../type":13}],29:[function(e,t){"use strict";function n(e){if(null===e)return!1;var t;return t=a.exec(e),null===t?!1:!0}function i(e){var t,n,i,r,o,s,u,c,l,p,f=0,d=null;if(t=a.exec(e),null===t)throw new Error("Date resolve error");if(n=+t[1],i=+t[2]-1,r=+t[3],!t[4])return new Date(Date.UTC(n,i,r));if(o=+t[4],s=+t[5],u=+t[6],t[7]){for(f=t[7].slice(0,3);f.length<3;)f+="0";f=+f}return t[9]&&(c=+t[10],l=+(t[11]||0),d=6e4*(60*c+l),"-"===t[9]&&(d=-d)),p=new Date(Date.UTC(n,i,r,o,s,u,f)),d&&p.setTime(p.getTime()-d),p}function r(e){return e.toISOString()}var o=e("../type"),a=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9]?)-([0-9][0-9]?)(?:(?:[Tt]|[ \\t]+)([0-9][0-9]?):([0-9][0-9]):([0-9][0-9])(?:\\.([0-9]*))?(?:[ \\t]*(Z|([-+])([0-9][0-9]?)(?::([0-9][0-9]))?))?)?$");t.exports=new o("tag:yaml.org,2002:timestamp",{kind:"scalar",resolve:n,construct:i,instanceOf:Date,represent:r})},{"../type":13}],30:[function(){},{}],"/":[function(e,t){"use strict";var n=e("./lib/js-yaml.js");t.exports=n},{"./lib/js-yaml.js":1}]},{},[])("/")});
\ No newline at end of file
diff --git a/node_modules/grunt-istanbul/node_modules/istanbul/node_modules/js-yaml/lib/js-yaml/loader.js b/node_modules/grunt-istanbul/node_modules/istanbul/node_modules/js-yaml/lib/js-yaml/loader.js
index 81aa89b..7e924a8 100644
--- a/node_modules/grunt-istanbul/node_modules/istanbul/node_modules/js-yaml/lib/js-yaml/loader.js
+++ b/node_modules/grunt-istanbul/node_modules/istanbul/node_modules/js-yaml/lib/js-yaml/loader.js
@@ -337,15 +337,15 @@ function skipSeparationSpace(state, allowComments, checkIndent) {
state.lineIndent++;
ch = state.input.charCodeAt(++state.position);
}
-
- if (state.lineIndent < checkIndent) {
- throwWarning(state, 'deficient indentation');
- }
} else {
break;
}
}
+ if (-1 !== checkIndent && 0 !== lineBreaks && state.lineIndent < checkIndent) {
+ throwWarning(state, 'deficient indentation');
+ }
+
return lineBreaks;
}
@@ -1241,8 +1241,8 @@ function composeNode(state, parentIndent, nodeContext, allowToSeek, allowCompact
var allowBlockStyles,
allowBlockScalars,
allowBlockCollections,
+ indentStatus = 1, // 1: this>parent, 0: this=parent, -1: this parentIndent) {
- isIndented = true;
-
- } else {
- return false;
+ if (state.lineIndent > parentIndent) {
+ indentStatus = 1;
+ } else if (state.lineIndent === parentIndent) {
+ indentStatus = 0;
+ } else if (state.lineIndent < parentIndent) {
+ indentStatus = -1;
}
}
}
- if (isIndented) {
+ if (1 === indentStatus) {
while (readTagProperty(state) || readAnchorProperty(state)) {
if (skipSeparationSpace(state, true, -1)) {
atNewLine = true;
+ allowBlockCollections = allowBlockStyles;
if (state.lineIndent > parentIndent) {
- isIndented = true;
- allowBlockCollections = allowBlockStyles;
-
+ indentStatus = 1;
} else if (state.lineIndent === parentIndent) {
- isIndented = false;
- allowBlockCollections = allowBlockStyles;
-
- } else {
- return true;
+ indentStatus = 0;
+ } else if (state.lineIndent < parentIndent) {
+ indentStatus = -1;
}
} else {
allowBlockCollections = false;
@@ -1302,7 +1297,7 @@ function composeNode(state, parentIndent, nodeContext, allowToSeek, allowCompact
allowBlockCollections = atNewLine || allowCompact;
}
- if (isIndented || CONTEXT_BLOCK_OUT === nodeContext) {
+ if (1 === indentStatus || CONTEXT_BLOCK_OUT === nodeContext) {
if (CONTEXT_FLOW_IN === nodeContext || CONTEXT_FLOW_OUT === nodeContext) {
flowIndent = parentIndent;
} else {
@@ -1311,7 +1306,7 @@ function composeNode(state, parentIndent, nodeContext, allowToSeek, allowCompact
blockIndent = state.position - state.lineStart;
- if (isIndented) {
+ if (1 === indentStatus) {
if (allowBlockCollections &&
(readBlockSequence(state, blockIndent) ||
readBlockMapping(state, blockIndent, flowIndent)) ||
@@ -1342,7 +1337,9 @@ function composeNode(state, parentIndent, nodeContext, allowToSeek, allowCompact
state.anchorMap[state.anchor] = state.result;
}
}
- } else {
+ } else if (0 === indentStatus) {
+ // Special case: block sequences are allowed to have same indentation level as the parent.
+ // http://www.yaml.org/spec/1.2/spec.html#id2799784
hasContent = allowBlockCollections && readBlockSequence(state, blockIndent);
}
}
diff --git a/node_modules/grunt-istanbul/node_modules/istanbul/node_modules/js-yaml/lib/js-yaml/type/binary.js b/node_modules/grunt-istanbul/node_modules/istanbul/node_modules/js-yaml/lib/js-yaml/type/binary.js
index e52599c..1fdf47d 100644
--- a/node_modules/grunt-istanbul/node_modules/istanbul/node_modules/js-yaml/lib/js-yaml/type/binary.js
+++ b/node_modules/grunt-istanbul/node_modules/istanbul/node_modules/js-yaml/lib/js-yaml/type/binary.js
@@ -12,6 +12,10 @@ var BASE64_MAP = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789
function resolveYamlBinary(data) {
+ if (null === data) {
+ return false;
+ }
+
var code, idx, bitlen = 0, len = 0, max = data.length, map = BASE64_MAP;
// Convert one by one.
diff --git a/node_modules/grunt-istanbul/node_modules/istanbul/node_modules/js-yaml/lib/js-yaml/type/bool.js b/node_modules/grunt-istanbul/node_modules/istanbul/node_modules/js-yaml/lib/js-yaml/type/bool.js
index 364626f..5c2a304 100644
--- a/node_modules/grunt-istanbul/node_modules/istanbul/node_modules/js-yaml/lib/js-yaml/type/bool.js
+++ b/node_modules/grunt-istanbul/node_modules/istanbul/node_modules/js-yaml/lib/js-yaml/type/bool.js
@@ -3,6 +3,10 @@
var Type = require('../type');
function resolveYamlBoolean(data) {
+ if (null === data) {
+ return false;
+ }
+
var max = data.length;
return (max === 4 && (data === 'true' || data === 'True' || data === 'TRUE')) ||
diff --git a/node_modules/grunt-istanbul/node_modules/istanbul/node_modules/js-yaml/lib/js-yaml/type/float.js b/node_modules/grunt-istanbul/node_modules/istanbul/node_modules/js-yaml/lib/js-yaml/type/float.js
index efb1331..9e3eff4 100644
--- a/node_modules/grunt-istanbul/node_modules/istanbul/node_modules/js-yaml/lib/js-yaml/type/float.js
+++ b/node_modules/grunt-istanbul/node_modules/istanbul/node_modules/js-yaml/lib/js-yaml/type/float.js
@@ -11,6 +11,10 @@ var YAML_FLOAT_PATTERN = new RegExp(
'|\\.(?:nan|NaN|NAN))$');
function resolveYamlFloat(data) {
+ if (null === data) {
+ return false;
+ }
+
var value, sign, base, digits;
if (!YAML_FLOAT_PATTERN.test(data)) {
diff --git a/node_modules/grunt-istanbul/node_modules/istanbul/node_modules/js-yaml/lib/js-yaml/type/int.js b/node_modules/grunt-istanbul/node_modules/istanbul/node_modules/js-yaml/lib/js-yaml/type/int.js
index 4dfdd6d..efada88 100644
--- a/node_modules/grunt-istanbul/node_modules/istanbul/node_modules/js-yaml/lib/js-yaml/type/int.js
+++ b/node_modules/grunt-istanbul/node_modules/istanbul/node_modules/js-yaml/lib/js-yaml/type/int.js
@@ -18,6 +18,10 @@ function isDecCode(c) {
}
function resolveYamlInteger(data) {
+ if (null === data) {
+ return false;
+ }
+
var max = data.length,
index = 0,
hasDigits = false,
diff --git a/node_modules/grunt-istanbul/node_modules/istanbul/node_modules/js-yaml/lib/js-yaml/type/js/function.js b/node_modules/grunt-istanbul/node_modules/istanbul/node_modules/js-yaml/lib/js-yaml/type/js/function.js
index 39b9dd2..05eface 100644
--- a/node_modules/grunt-istanbul/node_modules/istanbul/node_modules/js-yaml/lib/js-yaml/type/js/function.js
+++ b/node_modules/grunt-istanbul/node_modules/istanbul/node_modules/js-yaml/lib/js-yaml/type/js/function.js
@@ -19,6 +19,10 @@ try {
var Type = require('../../type');
function resolveJavascriptFunction(data) {
+ if (null === data) {
+ return false;
+ }
+
try {
var source = '(' + data + ')',
ast = esprima.parse(source, { range: true }),
diff --git a/node_modules/grunt-istanbul/node_modules/istanbul/node_modules/js-yaml/lib/js-yaml/type/js/regexp.js b/node_modules/grunt-istanbul/node_modules/istanbul/node_modules/js-yaml/lib/js-yaml/type/js/regexp.js
index fd36173..07ef521 100644
--- a/node_modules/grunt-istanbul/node_modules/istanbul/node_modules/js-yaml/lib/js-yaml/type/js/regexp.js
+++ b/node_modules/grunt-istanbul/node_modules/istanbul/node_modules/js-yaml/lib/js-yaml/type/js/regexp.js
@@ -3,6 +3,14 @@
var Type = require('../../type');
function resolveJavascriptRegExp(data) {
+ if (null === data) {
+ return false;
+ }
+
+ if (0 === data.length) {
+ return false;
+ }
+
var regexp = data,
tail = /\/([gim]*)$/.exec(data),
modifiers = '';
diff --git a/node_modules/grunt-istanbul/node_modules/istanbul/node_modules/js-yaml/lib/js-yaml/type/map.js b/node_modules/grunt-istanbul/node_modules/istanbul/node_modules/js-yaml/lib/js-yaml/type/map.js
index e0c8fdc..dab9838 100644
--- a/node_modules/grunt-istanbul/node_modules/istanbul/node_modules/js-yaml/lib/js-yaml/type/map.js
+++ b/node_modules/grunt-istanbul/node_modules/istanbul/node_modules/js-yaml/lib/js-yaml/type/map.js
@@ -3,5 +3,6 @@
var Type = require('../type');
module.exports = new Type('tag:yaml.org,2002:map', {
- kind: 'mapping'
+ kind: 'mapping',
+ construct: function (data) { return null !== data ? data : {}; }
});
diff --git a/node_modules/grunt-istanbul/node_modules/istanbul/node_modules/js-yaml/lib/js-yaml/type/merge.js b/node_modules/grunt-istanbul/node_modules/istanbul/node_modules/js-yaml/lib/js-yaml/type/merge.js
index e6fb8a2..29fa382 100644
--- a/node_modules/grunt-istanbul/node_modules/istanbul/node_modules/js-yaml/lib/js-yaml/type/merge.js
+++ b/node_modules/grunt-istanbul/node_modules/istanbul/node_modules/js-yaml/lib/js-yaml/type/merge.js
@@ -3,10 +3,10 @@
var Type = require('../type');
function resolveYamlMerge(data) {
- return '<<' === data;
+ return '<<' === data || null === data;
}
module.exports = new Type('tag:yaml.org,2002:merge', {
kind: 'scalar',
- resolve: resolveYamlMerge,
+ resolve: resolveYamlMerge
});
diff --git a/node_modules/grunt-istanbul/node_modules/istanbul/node_modules/js-yaml/lib/js-yaml/type/null.js b/node_modules/grunt-istanbul/node_modules/istanbul/node_modules/js-yaml/lib/js-yaml/type/null.js
index d0c0a63..3474055 100644
--- a/node_modules/grunt-istanbul/node_modules/istanbul/node_modules/js-yaml/lib/js-yaml/type/null.js
+++ b/node_modules/grunt-istanbul/node_modules/istanbul/node_modules/js-yaml/lib/js-yaml/type/null.js
@@ -3,6 +3,10 @@
var Type = require('../type');
function resolveYamlNull(data) {
+ if (null === data) {
+ return true;
+ }
+
var max = data.length;
return (max === 1 && data === '~') ||
diff --git a/node_modules/grunt-istanbul/node_modules/istanbul/node_modules/js-yaml/lib/js-yaml/type/omap.js b/node_modules/grunt-istanbul/node_modules/istanbul/node_modules/js-yaml/lib/js-yaml/type/omap.js
index 9a7f9d8..f956459 100644
--- a/node_modules/grunt-istanbul/node_modules/istanbul/node_modules/js-yaml/lib/js-yaml/type/omap.js
+++ b/node_modules/grunt-istanbul/node_modules/istanbul/node_modules/js-yaml/lib/js-yaml/type/omap.js
@@ -6,6 +6,10 @@ var _hasOwnProperty = Object.prototype.hasOwnProperty;
var _toString = Object.prototype.toString;
function resolveYamlOmap(data) {
+ if (null === data) {
+ return true;
+ }
+
var objectKeys = [], index, length, pair, pairKey, pairHasKey,
object = data;
@@ -41,7 +45,12 @@ function resolveYamlOmap(data) {
return true;
}
+function constructYamlOmap(data) {
+ return null !== data ? data : [];
+}
+
module.exports = new Type('tag:yaml.org,2002:omap', {
kind: 'sequence',
- resolve: resolveYamlOmap
+ resolve: resolveYamlOmap,
+ construct: constructYamlOmap
});
diff --git a/node_modules/grunt-istanbul/node_modules/istanbul/node_modules/js-yaml/lib/js-yaml/type/pairs.js b/node_modules/grunt-istanbul/node_modules/istanbul/node_modules/js-yaml/lib/js-yaml/type/pairs.js
index a019ea9..02a0af6 100644
--- a/node_modules/grunt-istanbul/node_modules/istanbul/node_modules/js-yaml/lib/js-yaml/type/pairs.js
+++ b/node_modules/grunt-istanbul/node_modules/istanbul/node_modules/js-yaml/lib/js-yaml/type/pairs.js
@@ -5,6 +5,10 @@ var Type = require('../type');
var _toString = Object.prototype.toString;
function resolveYamlPairs(data) {
+ if (null === data) {
+ return true;
+ }
+
var index, length, pair, keys, result,
object = data;
@@ -30,6 +34,10 @@ function resolveYamlPairs(data) {
}
function constructYamlPairs(data) {
+ if (null === data) {
+ return [];
+ }
+
var index, length, pair, keys, result,
object = data;
diff --git a/node_modules/grunt-istanbul/node_modules/istanbul/node_modules/js-yaml/lib/js-yaml/type/seq.js b/node_modules/grunt-istanbul/node_modules/istanbul/node_modules/js-yaml/lib/js-yaml/type/seq.js
index ec706c0..5b860a2 100644
--- a/node_modules/grunt-istanbul/node_modules/istanbul/node_modules/js-yaml/lib/js-yaml/type/seq.js
+++ b/node_modules/grunt-istanbul/node_modules/istanbul/node_modules/js-yaml/lib/js-yaml/type/seq.js
@@ -3,5 +3,6 @@
var Type = require('../type');
module.exports = new Type('tag:yaml.org,2002:seq', {
- kind: 'sequence'
+ kind: 'sequence',
+ construct: function (data) { return null !== data ? data : []; }
});
diff --git a/node_modules/grunt-istanbul/node_modules/istanbul/node_modules/js-yaml/lib/js-yaml/type/set.js b/node_modules/grunt-istanbul/node_modules/istanbul/node_modules/js-yaml/lib/js-yaml/type/set.js
index f4ec165..64d29e9 100644
--- a/node_modules/grunt-istanbul/node_modules/istanbul/node_modules/js-yaml/lib/js-yaml/type/set.js
+++ b/node_modules/grunt-istanbul/node_modules/istanbul/node_modules/js-yaml/lib/js-yaml/type/set.js
@@ -5,6 +5,10 @@ var Type = require('../type');
var _hasOwnProperty = Object.prototype.hasOwnProperty;
function resolveYamlSet(data) {
+ if (null === data) {
+ return true;
+ }
+
var key, object = data;
for (key in object) {
@@ -18,7 +22,12 @@ function resolveYamlSet(data) {
return true;
}
+function constructYamlSet(data) {
+ return null !== data ? data : {};
+}
+
module.exports = new Type('tag:yaml.org,2002:set', {
kind: 'mapping',
- resolve: resolveYamlSet
+ resolve: resolveYamlSet,
+ construct: constructYamlSet
});
diff --git a/node_modules/grunt-istanbul/node_modules/istanbul/node_modules/js-yaml/lib/js-yaml/type/str.js b/node_modules/grunt-istanbul/node_modules/istanbul/node_modules/js-yaml/lib/js-yaml/type/str.js
index 88189bb..8b5284f 100644
--- a/node_modules/grunt-istanbul/node_modules/istanbul/node_modules/js-yaml/lib/js-yaml/type/str.js
+++ b/node_modules/grunt-istanbul/node_modules/istanbul/node_modules/js-yaml/lib/js-yaml/type/str.js
@@ -3,5 +3,6 @@
var Type = require('../type');
module.exports = new Type('tag:yaml.org,2002:str', {
- kind: 'scalar'
+ kind: 'scalar',
+ construct: function (data) { return null !== data ? data : ''; }
});
diff --git a/node_modules/grunt-istanbul/node_modules/istanbul/node_modules/js-yaml/lib/js-yaml/type/timestamp.js b/node_modules/grunt-istanbul/node_modules/istanbul/node_modules/js-yaml/lib/js-yaml/type/timestamp.js
index ef7f6bb..dc8cf15 100644
--- a/node_modules/grunt-istanbul/node_modules/istanbul/node_modules/js-yaml/lib/js-yaml/type/timestamp.js
+++ b/node_modules/grunt-istanbul/node_modules/istanbul/node_modules/js-yaml/lib/js-yaml/type/timestamp.js
@@ -15,6 +15,10 @@ var YAML_TIMESTAMP_REGEXP = new RegExp(
'(?::([0-9][0-9]))?))?)?$'); // [11] tz_minute
function resolveYamlTimestamp(data) {
+ if (null === data) {
+ return false;
+ }
+
var match, year, month, day, hour, minute, second, fraction = 0,
delta = null, tz_hour, tz_minute, date;
diff --git a/node_modules/grunt-istanbul/node_modules/istanbul/node_modules/js-yaml/node_modules/argparse/HISTORY.md b/node_modules/grunt-istanbul/node_modules/istanbul/node_modules/js-yaml/node_modules/argparse/HISTORY.md
index 102f82b..bb97617 100644
--- a/node_modules/grunt-istanbul/node_modules/istanbul/node_modules/js-yaml/node_modules/argparse/HISTORY.md
+++ b/node_modules/grunt-istanbul/node_modules/istanbul/node_modules/js-yaml/node_modules/argparse/HISTORY.md
@@ -1,3 +1,9 @@
+0.1.16 / 2013-12-01
+-------------------
+
+* Maintenance release. Updated dependencies and docs.
+
+
0.1.15 / 2013-05-13
-------------------
diff --git a/node_modules/grunt-istanbul/node_modules/istanbul/node_modules/js-yaml/node_modules/argparse/README.md b/node_modules/grunt-istanbul/node_modules/istanbul/node_modules/js-yaml/node_modules/argparse/README.md
index f20e0c1..b7e8473 100644
--- a/node_modules/grunt-istanbul/node_modules/istanbul/node_modules/js-yaml/node_modules/argparse/README.md
+++ b/node_modules/grunt-istanbul/node_modules/istanbul/node_modules/js-yaml/node_modules/argparse/README.md
@@ -80,12 +80,12 @@ Creates a new ArgumentParser object.
- ```description``` - Text to display before the argument help.
- ```epilog``` - Text to display after the argument help.
-- ```addHelp``` - Add a -h/–help option to the parser. (default: True)
-- ```argumentDefault``` - Set the global default value for arguments. (default: None)
+- ```addHelp``` - Add a -h/–help option to the parser. (default: true)
+- ```argumentDefault``` - Set the global default value for arguments. (default: null)
- ```parents``` - A list of ArgumentParser objects whose arguments should also be included.
- ```prefixChars``` - The set of characters that prefix optional arguments. (default: ‘-‘)
- ```formatterClass``` - A class for customizing the help output.
-- ```prog``` - The name of the program (default: sys.argv[0])
+- ```prog``` - The name of the program (default: `path.basename(process.argv[1])`)
- ```usage``` - The string describing the program usage (default: generated)
- ```conflictHandler``` - Usually unnecessary, defines strategy for resolving conflicting optionals.
diff --git a/node_modules/grunt-istanbul/node_modules/istanbul/node_modules/js-yaml/node_modules/argparse/lib/argument_parser.js b/node_modules/grunt-istanbul/node_modules/istanbul/node_modules/js-yaml/node_modules/argparse/lib/argument_parser.js
index 97cf098..103c337 100644
--- a/node_modules/grunt-istanbul/node_modules/istanbul/node_modules/js-yaml/node_modules/argparse/lib/argument_parser.js
+++ b/node_modules/grunt-istanbul/node_modules/istanbul/node_modules/js-yaml/node_modules/argparse/lib/argument_parser.js
@@ -33,7 +33,7 @@ var Namespace = require('./namespace');
* Create a new ArgumentParser object.
*
* ##### Options:
- * - `prog` The name of the program (default: sys.argv[0])
+ * - `prog` The name of the program (default: Path.basename(process.argv[1]))
* - `usage` A usage message (default: auto-generated from arguments)
* - `description` A description of what the program does
* - `epilog` Text following the argument descriptions
@@ -311,13 +311,15 @@ ArgumentParser.prototype._parseKnownArgs = function (argStrings, namespace) {
// of two different mutually exclusive groups.
function actionHash(action) {
- // some sort of hashable key for this action
- // action itself cannot be a key in actionConflicts
- // I think getName() (join of optionStrings) is unique enough
- return action.getName();
- }
+ // some sort of hashable key for this action
+ // action itself cannot be a key in actionConflicts
+ // I think getName() (join of optionStrings) is unique enough
+ return action.getName();
+ }
+
var conflicts, key;
var actionConflicts = {};
+
this._mutuallyExclusiveGroups.forEach(function (mutexGroup) {
mutexGroup._groupActions.forEach(function (mutexAction, i, groupActions) {
key = actionHash(mutexAction);
@@ -513,11 +515,10 @@ ArgumentParser.prototype._parseKnownArgs = function (argStrings, namespace) {
var position;
var maxOptionStringIndex = -1;
- if (!!optionStringIndices) {
- for (position in optionStringIndices) {
- maxOptionStringIndex = Math.max(maxOptionStringIndex, parseInt(position, 10));
- }
- }
+
+ Object.keys(optionStringIndices).forEach(function (position) {
+ maxOptionStringIndex = Math.max(maxOptionStringIndex, parseInt(position, 10));
+ });
var positionalsEndIndex, nextOptionStringIndex;
@@ -525,6 +526,8 @@ ArgumentParser.prototype._parseKnownArgs = function (argStrings, namespace) {
// consume any Positionals preceding the next option
nextOptionStringIndex = null;
for (position in optionStringIndices) {
+ if (!optionStringIndices.hasOwnProperty(position)) { continue; }
+
position = parseInt(position, 10);
if (position >= startIndex) {
if (nextOptionStringIndex !== null) {
@@ -688,10 +691,10 @@ ArgumentParser.prototype._matchArgumentsPartial = function (actions, regexpArgSt
return string.length;
};
- for (i = actions.length; i > 0; i -= 1) {
+ for (i = actions.length; i > 0; i--) {
pattern = '';
actionSlice = actions.slice(0, i);
- for (j in actionSlice) {
+ for (j = 0; j < actionSlice.length; j++) {
pattern += self._getNargsPattern(actionSlice[j]);
}
diff --git a/node_modules/grunt-istanbul/node_modules/istanbul/node_modules/js-yaml/node_modules/argparse/lib/help/formatter.js b/node_modules/grunt-istanbul/node_modules/istanbul/node_modules/js-yaml/node_modules/argparse/lib/help/formatter.js
index 541d918..89319b9 100644
--- a/node_modules/grunt-istanbul/node_modules/istanbul/node_modules/js-yaml/node_modules/argparse/lib/help/formatter.js
+++ b/node_modules/grunt-istanbul/node_modules/istanbul/node_modules/js-yaml/node_modules/argparse/lib/help/formatter.js
@@ -722,20 +722,15 @@ HelpFormatter.prototype._formatArgs = function (action, metavarDefault) {
};
HelpFormatter.prototype._expandHelp = function (action) {
- var actionProperty;
- var actionValue;
+ var params = { prog: this._prog };
- var params = {prog: this._prog};
+ Object.keys(action).forEach(function (actionProperty) {
+ var actionValue = action[actionProperty];
- for (actionProperty in action) {
- if (action.hasOwnProperty(actionProperty)) {
- actionValue = action[actionProperty];
-
- if (actionValue !== $$.SUPPRESS) {
- params[actionProperty] = actionValue;
- }
+ if (actionValue !== $$.SUPPRESS) {
+ params[actionProperty] = actionValue;
}
- }
+ });
if (!!params.choices) {
if (_.isString(params.choices)) {
diff --git a/node_modules/grunt-istanbul/node_modules/istanbul/node_modules/js-yaml/node_modules/argparse/node_modules/underscore.string/.npmignore b/node_modules/grunt-istanbul/node_modules/istanbul/node_modules/js-yaml/node_modules/argparse/node_modules/underscore.string/.npmignore
new file mode 100644
index 0000000..0fc18a4
--- /dev/null
+++ b/node_modules/grunt-istanbul/node_modules/istanbul/node_modules/js-yaml/node_modules/argparse/node_modules/underscore.string/.npmignore
@@ -0,0 +1,2 @@
+test
+dist
diff --git a/node_modules/grunt-istanbul/node_modules/istanbul/node_modules/js-yaml/node_modules/argparse/node_modules/underscore.string/.travis.yml b/node_modules/grunt-istanbul/node_modules/istanbul/node_modules/js-yaml/node_modules/argparse/node_modules/underscore.string/.travis.yml
index ab27b29..b4ae6a7 100644
--- a/node_modules/grunt-istanbul/node_modules/istanbul/node_modules/js-yaml/node_modules/argparse/node_modules/underscore.string/.travis.yml
+++ b/node_modules/grunt-istanbul/node_modules/istanbul/node_modules/js-yaml/node_modules/argparse/node_modules/underscore.string/.travis.yml
@@ -1,8 +1,8 @@
-language: ruby
-rvm:
- - 1.9.3
+language: node_js
+node_js:
+ - "0.11"
before_script:
- "export DISPLAY=:99.0"
- "sh -e /etc/init.d/xvfb start"
- - sleep 2
\ No newline at end of file
+ - sleep 2
diff --git a/node_modules/grunt-istanbul/node_modules/istanbul/node_modules/js-yaml/node_modules/argparse/node_modules/underscore.string/Gemfile b/node_modules/grunt-istanbul/node_modules/istanbul/node_modules/js-yaml/node_modules/argparse/node_modules/underscore.string/Gemfile
deleted file mode 100644
index aed29c3..0000000
--- a/node_modules/grunt-istanbul/node_modules/istanbul/node_modules/js-yaml/node_modules/argparse/node_modules/underscore.string/Gemfile
+++ /dev/null
@@ -1,4 +0,0 @@
-source "https://rubygems.org"
-
-gem 'uglifier'
-gem 'rake'
diff --git a/node_modules/grunt-istanbul/node_modules/istanbul/node_modules/js-yaml/node_modules/argparse/node_modules/underscore.string/Gemfile.lock b/node_modules/grunt-istanbul/node_modules/istanbul/node_modules/js-yaml/node_modules/argparse/node_modules/underscore.string/Gemfile.lock
deleted file mode 100644
index 2c52be4..0000000
--- a/node_modules/grunt-istanbul/node_modules/istanbul/node_modules/js-yaml/node_modules/argparse/node_modules/underscore.string/Gemfile.lock
+++ /dev/null
@@ -1,17 +0,0 @@
-GEM
- remote: https://rubygems.org/
- specs:
- execjs (1.4.0)
- multi_json (~> 1.0)
- multi_json (1.3.6)
- rake (0.9.2.2)
- uglifier (1.3.0)
- execjs (>= 0.3.0)
- multi_json (~> 1.0, >= 1.0.2)
-
-PLATFORMS
- ruby
-
-DEPENDENCIES
- rake
- uglifier
diff --git a/node_modules/grunt-istanbul/node_modules/istanbul/node_modules/js-yaml/node_modules/argparse/node_modules/underscore.string/README.markdown b/node_modules/grunt-istanbul/node_modules/istanbul/node_modules/js-yaml/node_modules/argparse/node_modules/underscore.string/README.markdown
index 1a39ad9..4e58be4 100644
--- a/node_modules/grunt-istanbul/node_modules/istanbul/node_modules/js-yaml/node_modules/argparse/node_modules/underscore.string/README.markdown
+++ b/node_modules/grunt-istanbul/node_modules/istanbul/node_modules/js-yaml/node_modules/argparse/node_modules/underscore.string/README.markdown
@@ -9,11 +9,11 @@ for example from [Dive Into JavaScript][d].
[d]: http://www.diveintojavascript.com/core-javascript-reference/the-string-object
-As name states this an extension for [Underscore.js][u], but it can be used
+As name states this an extension for [Underscore.js][u] (and [Lo-Dash](http://lodash.com/)), but it can be used
independently from **_s**-global variable. But with Underscore.js you can
use Object-Oriented style and chaining:
-[u]: http://documentcloud.github.com/underscore/
+[u]: http://underscorejs.org/
```javascript
_(" epeli ").chain().trim().capitalize().value()
@@ -291,16 +291,19 @@ _('my name is epeli').titleize()
**camelize** _.camelize(string)
-Converts underscored or dasherized string to a camelized one
+Converts underscored or dasherized string to a camelized one. Begins with
+a lower case letter unless it starts with an underscore or string
```javascript
+_('moz-transform').camelize()
+=> 'mozTransform'
_('-moz-transform').camelize()
=> 'MozTransform'
```
**classify** _.classify(string)
-Converts string to camelized class name
+Converts string to camelized class name. First letter is always upper case
```javascript
_('some_class_name').classify()
@@ -415,7 +418,7 @@ C like string formatting.
Credits goes to [Alexandru Marasteanu][o].
For more detailed documentation, see the [original page][o].
-[o]: http://www.diveintojavascript.com/projects/sprintf-for-javascript
+[o]: http://www.diveintojavascript.com/projects/javascript-sprintf
```javascript
_.sprintf("%.1f", 1.17)
@@ -680,12 +683,20 @@ _ = _.string
## Changelog ##
+### 2.4.0 ###
+
+* Move from rake to gulp
+* Add support form classify camelcase strings
+* Fix bower.json
+* [Full changelog](https://github.com/epeli/underscore.string/compare/v2.3.3...2.4.0)
+
### 2.3.3 ###
* Add `toBoolean`
* Add `unquote`
* Add quote char option to `quote`
* Support dash-separated words in `titleize`
+* [Full changelog](https://github.com/epeli/underscore.string/compare/v2.3.2...2.3.3)
### 2.3.2 ###
diff --git a/node_modules/grunt-istanbul/node_modules/istanbul/node_modules/js-yaml/node_modules/argparse/node_modules/underscore.string/Rakefile b/node_modules/grunt-istanbul/node_modules/istanbul/node_modules/js-yaml/node_modules/argparse/node_modules/underscore.string/Rakefile
deleted file mode 100644
index 2cd9eed..0000000
--- a/node_modules/grunt-istanbul/node_modules/istanbul/node_modules/js-yaml/node_modules/argparse/node_modules/underscore.string/Rakefile
+++ /dev/null
@@ -1,23 +0,0 @@
-# encoding: utf-8
-task default: :test
-
-desc 'Use UglifyJS to compress Underscore.string'
-task :build do
- require 'uglifier'
- source = File.read('lib/underscore.string.js', :encoding => 'utf-8')
- compressed = Uglifier.compile(source, copyright: false)
- File.open('dist/underscore.string.min.js', 'w'){ |f| f.write compressed }
- compression_rate = compressed.length.to_f/source.length
- puts "compressed dist/underscore.string.min.js: #{compressed.length}/#{source.length} #{(compression_rate * 100).round}%"
-end
-
-desc 'Run tests'
-task :test do
- puts "Running underscore.string test suite."
- result1 = system %{phantomjs ./test/run-qunit.js "test/test.html"}
-
- puts "Running Underscore test suite."
- result2 = system %{phantomjs ./test/run-qunit.js "test/test_underscore/index.html"}
-
- exit(result1 && result2 ? 0 : 1)
-end
diff --git a/node_modules/grunt-istanbul/node_modules/istanbul/node_modules/js-yaml/node_modules/argparse/node_modules/underscore.string/bower.json b/node_modules/grunt-istanbul/node_modules/istanbul/node_modules/js-yaml/node_modules/argparse/node_modules/underscore.string/bower.json
new file mode 100644
index 0000000..6aef0bd
--- /dev/null
+++ b/node_modules/grunt-istanbul/node_modules/istanbul/node_modules/js-yaml/node_modules/argparse/node_modules/underscore.string/bower.json
@@ -0,0 +1,33 @@
+{
+ "name": "underscore.string",
+ "version": "2.4.0",
+ "description": "String manipulation extensions for Underscore.js javascript library.",
+ "homepage": "http://epeli.github.com/underscore.string/",
+ "contributors": [
+ "Esa-Matti Suuronen (http://esa-matti.suuronen.org/)",
+ "Edward Tsech ",
+ "Pavel Pravosud ()",
+ "Sasha Koss (http://koss.nocorp.me/)",
+ "Vladimir Dronnikov ",
+ "Pete Kruckenberg ()",
+ "Paul Chavard ()",
+ "Ed Finkler ()"
+ ],
+ "keywords": [
+ "underscore",
+ "string"
+ ],
+ "main": "./lib/underscore.string.js",
+ "repository": {
+ "type": "git",
+ "url": "https://github.com/epeli/underscore.string.git"
+ },
+ "bugs": {
+ "url": "https://github.com/epeli/underscore.string/issues"
+ },
+ "licenses": [
+ {
+ "type": "MIT"
+ }
+ ]
+}
diff --git a/node_modules/grunt-istanbul/node_modules/istanbul/node_modules/js-yaml/node_modules/argparse/node_modules/underscore.string/component.json b/node_modules/grunt-istanbul/node_modules/istanbul/node_modules/js-yaml/node_modules/argparse/node_modules/underscore.string/component.json
index ae91b65..96e23d3 100644
--- a/node_modules/grunt-istanbul/node_modules/istanbul/node_modules/js-yaml/node_modules/argparse/node_modules/underscore.string/component.json
+++ b/node_modules/grunt-istanbul/node_modules/istanbul/node_modules/js-yaml/node_modules/argparse/node_modules/underscore.string/component.json
@@ -2,7 +2,7 @@
"name": "underscore.string",
"repo": "epeli/underscore.string",
"description": "String manipulation extensions for Underscore.js javascript library",
- "version": "2.3.3",
+ "version": "2.4.0",
"keywords": ["underscore", "string"],
"dependencies": {},
"development": {},
diff --git a/node_modules/grunt-istanbul/node_modules/istanbul/node_modules/js-yaml/node_modules/argparse/node_modules/underscore.string/dist/underscore.string.min.js b/node_modules/grunt-istanbul/node_modules/istanbul/node_modules/js-yaml/node_modules/argparse/node_modules/underscore.string/dist/underscore.string.min.js
deleted file mode 100644
index 4f6b2b9..0000000
--- a/node_modules/grunt-istanbul/node_modules/istanbul/node_modules/js-yaml/node_modules/argparse/node_modules/underscore.string/dist/underscore.string.min.js
+++ /dev/null
@@ -1 +0,0 @@
-!function(e,n){"use strict";function r(e,n){var r,t,u=e.toLowerCase();for(n=[].concat(n),r=0;n.length>r;r+=1)if(t=n[r]){if(t.test&&t.test(e))return!0;if(t.toLowerCase()===u)return!0}}var t=n.prototype.trim,u=n.prototype.trimRight,i=n.prototype.trimLeft,l=function(e){return 1*e||0},o=function(e,n){if(1>n)return"";for(var r="";n>0;)1&n&&(r+=e),n>>=1,e+=e;return r},a=[].slice,c=function(e){return null==e?"\\s":e.source?e.source:"["+g.escapeRegExp(e)+"]"},s={lt:"<",gt:">",quot:'"',amp:"&",apos:"'"},f={};for(var p in s)f[s[p]]=p;f["'"]="#39";var h=function(){function e(e){return Object.prototype.toString.call(e).slice(8,-1).toLowerCase()}var r=o,t=function(){return t.cache.hasOwnProperty(arguments[0])||(t.cache[arguments[0]]=t.parse(arguments[0])),t.format.call(null,t.cache[arguments[0]],arguments)};return t.format=function(t,u){var i,l,o,a,c,s,f,p=1,g=t.length,d="",m=[];for(l=0;g>l;l++)if(d=e(t[l]),"string"===d)m.push(t[l]);else if("array"===d){if(a=t[l],a[2])for(i=u[p],o=0;a[2].length>o;o++){if(!i.hasOwnProperty(a[2][o]))throw new Error(h('[_.sprintf] property "%s" does not exist',a[2][o]));i=i[a[2][o]]}else i=a[1]?u[a[1]]:u[p++];if(/[^s]/.test(a[8])&&"number"!=e(i))throw new Error(h("[_.sprintf] expecting number but found %s",e(i)));switch(a[8]){case"b":i=i.toString(2);break;case"c":i=n.fromCharCode(i);break;case"d":i=parseInt(i,10);break;case"e":i=a[7]?i.toExponential(a[7]):i.toExponential();break;case"f":i=a[7]?parseFloat(i).toFixed(a[7]):parseFloat(i);break;case"o":i=i.toString(8);break;case"s":i=(i=n(i))&&a[7]?i.substring(0,a[7]):i;break;case"u":i=Math.abs(i);break;case"x":i=i.toString(16);break;case"X":i=i.toString(16).toUpperCase()}i=/[def]/.test(a[8])&&a[3]&&i>=0?"+"+i:i,s=a[4]?"0"==a[4]?"0":a[4].charAt(1):" ",f=a[6]-n(i).length,c=a[6]?r(s,f):"",m.push(a[5]?i+c:c+i)}return m.join("")},t.cache={},t.parse=function(e){for(var n=e,r=[],t=[],u=0;n;){if(null!==(r=/^[^\x25]+/.exec(n)))t.push(r[0]);else if(null!==(r=/^\x25{2}/.exec(n)))t.push("%");else{if(null===(r=/^\x25(?:([1-9]\d*)\$|\(([^\)]+)\))?(\+)?(0|'[^$])?(-)?(\d+)?(?:\.(\d+))?([b-fosuxX])/.exec(n)))throw new Error("[_.sprintf] huh?");if(r[2]){u|=1;var i=[],l=r[2],o=[];if(null===(o=/^([a-z_][a-z_\d]*)/i.exec(l)))throw new Error("[_.sprintf] huh?");for(i.push(o[1]);""!==(l=l.substring(o[0].length));)if(null!==(o=/^\.([a-z_][a-z_\d]*)/i.exec(l)))i.push(o[1]);else{if(null===(o=/^\[(\d+)\]/.exec(l)))throw new Error("[_.sprintf] huh?");i.push(o[1])}r[2]=i}else u|=2;if(3===u)throw new Error("[_.sprintf] mixing positional and named placeholders is not (yet) supported");t.push(r)}n=n.substring(r[0].length)}return t},t}(),g={VERSION:"2.3.0",isBlank:function(e){return null==e&&(e=""),/^\s*$/.test(e)},stripTags:function(e){return null==e?"":n(e).replace(/<\/?[^>]+>/g,"")},capitalize:function(e){return e=null==e?"":n(e),e.charAt(0).toUpperCase()+e.slice(1)},chop:function(e,r){return null==e?[]:(e=n(e),r=~~r,r>0?e.match(new RegExp(".{1,"+r+"}","g")):[e])},clean:function(e){return g.strip(e).replace(/\s+/g," ")},count:function(e,r){if(null==e||null==r)return 0;e=n(e),r=n(r);for(var t=0,u=0,i=r.length;;){if(u=e.indexOf(r,u),-1===u)break;t++,u+=i}return t},chars:function(e){return null==e?[]:n(e).split("")},swapCase:function(e){return null==e?"":n(e).replace(/\S/g,function(e){return e===e.toUpperCase()?e.toLowerCase():e.toUpperCase()})},escapeHTML:function(e){return null==e?"":n(e).replace(/[&<>"']/g,function(e){return"&"+f[e]+";"})},unescapeHTML:function(e){return null==e?"":n(e).replace(/\&([^;]+);/g,function(e,r){var t;return r in s?s[r]:(t=r.match(/^#x([\da-fA-F]+)$/))?n.fromCharCode(parseInt(t[1],16)):(t=r.match(/^#(\d+)$/))?n.fromCharCode(~~t[1]):e})},escapeRegExp:function(e){return null==e?"":n(e).replace(/([.*+?^=!:${}()|[\]\/\\])/g,"\\$1")},splice:function(e,n,r,t){var u=g.chars(e);return u.splice(~~n,~~r,t),u.join("")},insert:function(e,n,r){return g.splice(e,n,0,r)},include:function(e,r){return""===r?!0:null==e?!1:-1!==n(e).indexOf(r)},join:function(){var e=a.call(arguments),n=e.shift();return null==n&&(n=""),e.join(n)},lines:function(e){return null==e?[]:n(e).split("\n")},reverse:function(e){return g.chars(e).reverse().join("")},startsWith:function(e,r){return""===r?!0:null==e||null==r?!1:(e=n(e),r=n(r),e.length>=r.length&&e.slice(0,r.length)===r)},endsWith:function(e,r){return""===r?!0:null==e||null==r?!1:(e=n(e),r=n(r),e.length>=r.length&&e.slice(e.length-r.length)===r)},succ:function(e){return null==e?"":(e=n(e),e.slice(0,-1)+n.fromCharCode(e.charCodeAt(e.length-1)+1))},titleize:function(e){return null==e?"":(e=n(e).toLowerCase(),e.replace(/(?:^|\s|-)\S/g,function(e){return e.toUpperCase()}))},camelize:function(e){return g.trim(e).replace(/[-_\s]+(.)?/g,function(e,n){return n?n.toUpperCase():""})},underscored:function(e){return g.trim(e).replace(/([a-z\d])([A-Z]+)/g,"$1_$2").replace(/[-\s]+/g,"_").toLowerCase()},dasherize:function(e){return g.trim(e).replace(/([A-Z])/g,"-$1").replace(/[-_\s]+/g,"-").toLowerCase()},classify:function(e){return g.titleize(n(e).replace(/[\W_]/g," ")).replace(/\s/g,"")},humanize:function(e){return g.capitalize(g.underscored(e).replace(/_id$/,"").replace(/_/g," "))},trim:function(e,r){return null==e?"":!r&&t?t.call(e):(r=c(r),n(e).replace(new RegExp("^"+r+"+|"+r+"+$","g"),""))},ltrim:function(e,r){return null==e?"":!r&&i?i.call(e):(r=c(r),n(e).replace(new RegExp("^"+r+"+"),""))},rtrim:function(e,r){return null==e?"":!r&&u?u.call(e):(r=c(r),n(e).replace(new RegExp(r+"+$"),""))},truncate:function(e,r,t){return null==e?"":(e=n(e),t=t||"...",r=~~r,e.length>r?e.slice(0,r)+t:e)},prune:function(e,r,t){if(null==e)return"";if(e=n(e),r=~~r,t=null!=t?n(t):"...",r>=e.length)return e;var u=function(e){return e.toUpperCase()!==e.toLowerCase()?"A":" "},i=e.slice(0,r+1).replace(/.(?=\W*\w*$)/g,u);return i=i.slice(i.length-2).match(/\w\w/)?i.replace(/\s*\S+$/,""):g.rtrim(i.slice(0,i.length-1)),(i+t).length>e.length?e:e.slice(0,i.length)+t},words:function(e,n){return g.isBlank(e)?[]:g.trim(e,n).split(n||/\s+/)},pad:function(e,r,t,u){e=null==e?"":n(e),r=~~r;var i=0;switch(t?t.length>1&&(t=t.charAt(0)):t=" ",u){case"right":return i=r-e.length,e+o(t,i);case"both":return i=r-e.length,o(t,Math.ceil(i/2))+e+o(t,Math.floor(i/2));default:return i=r-e.length,o(t,i)+e}},lpad:function(e,n,r){return g.pad(e,n,r)},rpad:function(e,n,r){return g.pad(e,n,r,"right")},lrpad:function(e,n,r){return g.pad(e,n,r,"both")},sprintf:h,vsprintf:function(e,n){return n.unshift(e),h.apply(null,n)},toNumber:function(e,n){return e?(e=g.trim(e),e.match(/^-?\d+(?:\.\d+)?$/)?l(l(e).toFixed(~~n)):0/0):0},numberFormat:function(e,n,r,t){if(isNaN(e)||null==e)return"";e=e.toFixed(~~n),t="string"==typeof t?t:",";var u=e.split("."),i=u[0],l=u[1]?(r||".")+u[1]:"";return i.replace(/(\d)(?=(?:\d{3})+$)/g,"$1"+t)+l},strRight:function(e,r){if(null==e)return"";e=n(e),r=null!=r?n(r):r;var t=r?e.indexOf(r):-1;return~t?e.slice(t+r.length,e.length):e},strRightBack:function(e,r){if(null==e)return"";e=n(e),r=null!=r?n(r):r;var t=r?e.lastIndexOf(r):-1;return~t?e.slice(t+r.length,e.length):e},strLeft:function(e,r){if(null==e)return"";e=n(e),r=null!=r?n(r):r;var t=r?e.indexOf(r):-1;return~t?e.slice(0,t):e},strLeftBack:function(e,n){if(null==e)return"";e+="",n=null!=n?""+n:n;var r=e.lastIndexOf(n);return~r?e.slice(0,r):e},toSentence:function(e,n,r,t){n=n||", ",r=r||" and ";var u=e.slice(),i=u.pop();return e.length>2&&t&&(r=g.rtrim(n)+r),u.length?u.join(n)+r+i:i},toSentenceSerial:function(){var e=a.call(arguments);return e[3]=!0,g.toSentence.apply(g,e)},slugify:function(e){if(null==e)return"";var r="ąàáäâãåæăćęèéëêìíïîłńòóöôõøśșțùúüûñçżź",t="aaaaaaaaaceeeeeiiiilnoooooosstuuuunczz",u=new RegExp(c(r),"g");return e=n(e).toLowerCase().replace(u,function(e){var n=r.indexOf(e);return t.charAt(n)||"-"}),g.dasherize(e.replace(/[^\w\s-]/g,""))},surround:function(e,n){return[n,e,n].join("")},quote:function(e,n){return g.surround(e,n||'"')},unquote:function(e,n){return n=n||'"',e[0]===n&&e[e.length-1]===n?e.slice(1,e.length-1):e},exports:function(){var e={};for(var n in this)this.hasOwnProperty(n)&&!n.match(/^(?:include|contains|reverse)$/)&&(e[n]=this[n]);return e},repeat:function(e,r,t){if(null==e)return"";if(r=~~r,null==t)return o(n(e),r);for(var u=[];r>0;u[--r]=e);return u.join(t)},naturalCmp:function(e,r){if(e==r)return 0;if(!e)return-1;if(!r)return 1;for(var t=/(\.\d+)|(\d+)|(\D+)/g,u=n(e).toLowerCase().match(t),i=n(r).toLowerCase().match(t),l=Math.min(u.length,i.length),o=0;l>o;o++){var a=u[o],c=i[o];if(a!==c){var s=parseInt(a,10);if(!isNaN(s)){var f=parseInt(c,10);if(!isNaN(f)&&s-f)return s-f}return c>a?-1:1}}return u.length===i.length?u.length-i.length:r>e?-1:1},levenshtein:function(e,r){if(null==e&&null==r)return 0;if(null==e)return n(r).length;if(null==r)return n(e).length;e=n(e),r=n(r);for(var t,u,i=[],l=0;r.length>=l;l++)for(var o=0;e.length>=o;o++)u=l&&o?e.charAt(o-1)===r.charAt(l-1)?t:Math.min(i[o],i[o-1],t)+1:l+o,t=i[o],i[o]=u;return i.pop()},toBoolean:function(e,n,t){return"number"==typeof e&&(e=""+e),"string"!=typeof e?!!e:(e=g.trim(e),r(e,n||["true","1"])?!0:r(e,t||["false","0"])?!1:void 0)}};g.strip=g.trim,g.lstrip=g.ltrim,g.rstrip=g.rtrim,g.center=g.lrpad,g.rjust=g.lpad,g.ljust=g.rpad,g.contains=g.include,g.q=g.quote,g.toBool=g.toBoolean,"undefined"!=typeof exports&&("undefined"!=typeof module&&module.exports&&(module.exports=g),exports._s=g),"function"==typeof define&&define.amd&&define("underscore.string",[],function(){return g}),e._=e._||{},e._.string=e._.str=g}(this,String);
\ No newline at end of file
diff --git a/node_modules/grunt-istanbul/node_modules/istanbul/node_modules/js-yaml/node_modules/argparse/node_modules/underscore.string/foo.js b/node_modules/grunt-istanbul/node_modules/istanbul/node_modules/js-yaml/node_modules/argparse/node_modules/underscore.string/foo.js
new file mode 100644
index 0000000..cdc1d08
--- /dev/null
+++ b/node_modules/grunt-istanbul/node_modules/istanbul/node_modules/js-yaml/node_modules/argparse/node_modules/underscore.string/foo.js
@@ -0,0 +1,10 @@
+
+ function boolMatch(s, matchers) {
+ var i, matcher, down = s.toLowerCase();
+ matchers = [].concat(matchers);
+ for (i = 0; i < matchers.length; i += 1) {
+ matcher = matchers[i];
+ if (matcher.test && matcher.test(s)) return true;
+ if (matcher && matcher.toLowerCase() === down) return true;
+ }
+ }
diff --git a/node_modules/grunt-istanbul/node_modules/istanbul/node_modules/js-yaml/node_modules/argparse/node_modules/underscore.string/gulpfile.js b/node_modules/grunt-istanbul/node_modules/istanbul/node_modules/js-yaml/node_modules/argparse/node_modules/underscore.string/gulpfile.js
new file mode 100644
index 0000000..6eaead8
--- /dev/null
+++ b/node_modules/grunt-istanbul/node_modules/istanbul/node_modules/js-yaml/node_modules/argparse/node_modules/underscore.string/gulpfile.js
@@ -0,0 +1,26 @@
+var gulp = require('gulp'),
+ qunit = require("gulp-qunit"),
+ uglify = require('gulp-uglify'),
+ clean = require('gulp-clean'),
+ rename = require('gulp-rename'),
+ SRC = 'lib/underscore.string.js',
+ DEST = 'dist',
+ MIN_FILE = 'underscore.string.min.js',
+ TEST_SUITES = ['test/test.html', 'test/test_underscore/index.html'];
+
+gulp.task('test', function() {
+ return gulp.src(TEST_SUITES)
+ .pipe(qunit());
+});
+
+gulp.task('clean', function() {
+ return gulp.src(DEST)
+ .pipe(clean());
+});
+
+gulp.task('build', ['test', 'clean'], function() {
+ return gulp.src(SRC)
+ .pipe(uglify())
+ .pipe(rename(MIN_FILE))
+ .pipe(gulp.dest(DEST));
+});
diff --git a/node_modules/grunt-istanbul/node_modules/istanbul/node_modules/js-yaml/node_modules/argparse/node_modules/underscore.string/lib/underscore.string.js b/node_modules/grunt-istanbul/node_modules/istanbul/node_modules/js-yaml/node_modules/argparse/node_modules/underscore.string/lib/underscore.string.js
index 8761117..c9c8d47 100644
--- a/node_modules/grunt-istanbul/node_modules/istanbul/node_modules/js-yaml/node_modules/argparse/node_modules/underscore.string/lib/underscore.string.js
+++ b/node_modules/grunt-istanbul/node_modules/istanbul/node_modules/js-yaml/node_modules/argparse/node_modules/underscore.string/lib/underscore.string.js
@@ -3,7 +3,7 @@
// Underscore.string is freely distributable under the terms of the MIT license.
// Documentation: https://github.com/epeli/underscore.string
// Some code is borrowed from MooTools and Alexandru Marasteanu.
-// Version '2.3.2'
+// Version '2.4.0'
!function(root, String){
'use strict';
@@ -189,7 +189,7 @@
var _s = {
- VERSION: '2.3.0',
+ VERSION: '2.4.0',
isBlank: function(str){
if (str == null) str = '';
@@ -349,7 +349,7 @@
},
classify: function(str){
- return _s.titleize(String(str).replace(/[\W_]/g, ' ')).replace(/\s/g, '');
+ return _s.capitalize(_s.camelize(String(str).replace(/[\W_]/g, ' ')).replace(/\s/g, ''));
},
humanize: function(str){
@@ -360,7 +360,7 @@
if (str == null) return '';
if (!characters && nativeTrim) return nativeTrim.call(str);
characters = defaultToWhiteSpace(characters);
- return String(str).replace(new RegExp('\^' + characters + '+|' + characters + '+$', 'g'), '');
+ return String(str).replace(new RegExp('^' + characters + '+|' + characters + '+$', 'g'), '');
},
ltrim: function(str, characters){
diff --git a/node_modules/grunt-istanbul/node_modules/istanbul/node_modules/js-yaml/node_modules/argparse/node_modules/underscore.string/package.json b/node_modules/grunt-istanbul/node_modules/istanbul/node_modules/js-yaml/node_modules/argparse/node_modules/underscore.string/package.json
index 9556365..fb7151e 100644
--- a/node_modules/grunt-istanbul/node_modules/istanbul/node_modules/js-yaml/node_modules/argparse/node_modules/underscore.string/package.json
+++ b/node_modules/grunt-istanbul/node_modules/istanbul/node_modules/js-yaml/node_modules/argparse/node_modules/underscore.string/package.json
@@ -1,6 +1,6 @@
{
"name": "underscore.string",
- "version": "2.3.3",
+ "version": "2.4.0",
"description": "String manipulation extensions for Underscore.js javascript library.",
"homepage": "http://epeli.github.com/underscore.string/",
"contributors": [
@@ -47,7 +47,7 @@
"underscore",
"string"
],
- "main": "./lib/underscore.string",
+ "main": "./lib/underscore.string.js",
"directories": {
"lib": "./lib"
},
@@ -66,9 +66,42 @@
"type": "MIT"
}
],
- "readme": "# Underscore.string [![Build Status](https://secure.travis-ci.org/epeli/underscore.string.png?branch=master)](http://travis-ci.org/epeli/underscore.string) #\n\n\n\nJavascript lacks complete string manipulation operations.\nThis an attempt to fill that gap. List of build-in methods can be found\nfor example from [Dive Into JavaScript][d].\n\n[d]: http://www.diveintojavascript.com/core-javascript-reference/the-string-object\n\n\nAs name states this an extension for [Underscore.js][u], but it can be used\nindependently from **_s**-global variable. But with Underscore.js you can\nuse Object-Oriented style and chaining:\n\n[u]: http://documentcloud.github.com/underscore/\n\n```javascript\n_(\" epeli \").chain().trim().capitalize().value()\n=> \"Epeli\"\n```\n\n## Download ##\n\n * [Development version](https://raw.github.com/epeli/underscore.string/master/lib/underscore.string.js) *Uncompressed with Comments 18kb*\n * [Production version](https://github.com/epeli/underscore.string/raw/master/dist/underscore.string.min.js) *Minified 7kb*\n\n\n## Node.js installation ##\n\n**npm package**\n\n npm install underscore.string\n\n**Standalone usage**:\n\n```javascript\nvar _s = require('underscore.string');\n```\n\n**Integrate with Underscore.js**:\n\n```javascript\nvar _ = require('underscore');\n\n// Import Underscore.string to separate object, because there are conflict functions (include, reverse, contains)\n_.str = require('underscore.string');\n\n// Mix in non-conflict functions to Underscore namespace if you want\n_.mixin(_.str.exports());\n\n// All functions, include conflict, will be available through _.str object\n_.str.include('Underscore.string', 'string'); // => true\n```\n\n**Or Integrate with Underscore.js without module loading**\n\nRun the following expression after Underscore.js and Underscore.string are loaded\n```javascript\n// _.str becomes a global variable if no module loading is detected\n// Mix in non-conflict functions to Underscore namespace\n_.mixin(_.str.exports());\n```\n\n## String Functions ##\n\nFor availability of functions in this way you need to mix in Underscore.string functions:\n\n```javascript\n_.mixin(_.string.exports());\n```\n\notherwise functions from examples will be available through _.string or _.str objects:\n\n```javascript\n_.str.capitalize('epeli')\n=> \"Epeli\"\n```\n\n**numberFormat** _.numberFormat(number, [ decimals=0, decimalSeparator='.', orderSeparator=','])\n\nFormats the numbers.\n\n```javascript\n_.numberFormat(1000, 2)\n=> \"1,000.00\"\n\n_.numberFormat(123456789.123, 5, '.', ',')\n=> \"123,456,789.12300\"\n```\n\n\n**levenshtein** _.levenshtein(string1, string2)\n\nCalculates [Levenshtein distance][ld] between two strings.\n[ld]: http://en.wikipedia.org/wiki/Levenshtein_distance\n\n```javascript\n_.levenshtein('kitten', 'kittah')\n=> 2\n```\n\n**capitalize** _.capitalize(string)\n\nConverts first letter of the string to uppercase.\n\n```javascript\n_.capitalize(\"foo Bar\")\n=> \"Foo Bar\"\n```\n\n**chop** _.chop(string, step)\n\n```javascript\n_.chop('whitespace', 3)\n=> ['whi','tes','pac','e']\n```\n\n**clean** _.clean(str)\n\nCompress some whitespaces to one.\n\n```javascript\n_.clean(\" foo bar \")\n=> 'foo bar'\n```\n\n**chars** _.chars(str)\n\n```javascript\n_.chars('Hello')\n=> ['H','e','l','l','o']\n```\n\n**swapCase** _.swapCase(str)\n\nReturns a copy of the string in which all the case-based characters have had their case swapped.\n\n```javascript\n_.swapCase('hELLO')\n=> 'Hello'\n```\n\n**include** available only through _.str object, because Underscore has function with the same name.\n\n```javascript\n_.str.include(\"foobar\", \"ob\")\n=> true\n```\n\n(removed) **includes** _.includes(string, substring)\n\nTests if string contains a substring.\n\n```javascript\n_.includes(\"foobar\", \"ob\")\n=> true\n```\n\n**includes** function was removed\n\nBut you can create it in this way, for compatibility with previous versions:\n\n```javascript\n_.includes = _.str.include\n```\n\n**count** _.count(string, substring)\n\n```javascript\n_('Hello world').count('l')\n=> 3\n```\n\n**escapeHTML** _.escapeHTML(string)\n\nConverts HTML special characters to their entity equivalents.\n\n```javascript\n_('Blah blah blah
').escapeHTML();\n=> '<div>Blah blah blah</div>'\n```\n\n**unescapeHTML** _.unescapeHTML(string)\n\nConverts entity characters to HTML equivalents.\n\n```javascript\n_('<div>Blah blah blah</div>').unescapeHTML();\n=> 'Blah blah blah
'\n```\n\n**insert** _.insert(string, index, substing)\n\n```javascript\n_('Hello ').insert(6, 'world')\n=> 'Hello world'\n```\n\n**isBlank** _.isBlank(string)\n\n```javascript\n_('').isBlank(); // => true\n_('\\n').isBlank(); // => true\n_(' ').isBlank(); // => true\n_('a').isBlank(); // => false\n```\n\n**join** _.join(separator, *strings)\n\nJoins strings together with given separator\n\n```javascript\n_.join(\" \", \"foo\", \"bar\")\n=> \"foo bar\"\n```\n\n**lines** _.lines(str)\n\n```javascript\n_.lines(\"Hello\\nWorld\")\n=> [\"Hello\", \"World\"]\n```\n\n**reverse** available only through _.str object, because Underscore has function with the same name.\n\nReturn reversed string:\n\n```javascript\n_.str.reverse(\"foobar\")\n=> 'raboof'\n```\n\n**splice** _.splice(string, index, howmany, substring)\n\nLike a array splice.\n\n```javascript\n_('https://edtsech@bitbucket.org/edtsech/underscore.strings').splice(30, 7, 'epeli')\n=> 'https://edtsech@bitbucket.org/epeli/underscore.strings'\n```\n\n**startsWith** _.startsWith(string, starts)\n\nThis method checks whether string starts with starts.\n\n```javascript\n_(\"image.gif\").startsWith(\"image\")\n=> true\n```\n\n**endsWith** _.endsWith(string, ends)\n\nThis method checks whether string ends with ends.\n\n```javascript\n_(\"image.gif\").endsWith(\"gif\")\n=> true\n```\n\n**succ** _.succ(str)\n\nReturns the successor to str.\n\n```javascript\n_('a').succ()\n=> 'b'\n\n_('A').succ()\n=> 'B'\n```\n\n**supplant**\n\nSupplant function was removed, use Underscore.js [template function][p].\n\n[p]: http://documentcloud.github.com/underscore/#template\n\n**strip** alias for *trim*\n\n**lstrip** alias for *ltrim*\n\n**rstrip** alias for *rtrim*\n\n**titleize** _.titleize(string)\n\n```javascript\n_('my name is epeli').titleize()\n=> 'My Name Is Epeli'\n```\n\n**camelize** _.camelize(string)\n\nConverts underscored or dasherized string to a camelized one\n\n```javascript\n_('-moz-transform').camelize()\n=> 'MozTransform'\n```\n\n**classify** _.classify(string)\n\nConverts string to camelized class name\n\n```javascript\n_('some_class_name').classify()\n=> 'SomeClassName'\n```\n\n**underscored** _.underscored(string)\n\nConverts a camelized or dasherized string into an underscored one\n\n```javascript\n_('MozTransform').underscored()\n=> 'moz_transform'\n```\n\n**dasherize** _.dasherize(string)\n\nConverts a underscored or camelized string into an dasherized one\n\n```javascript\n_('MozTransform').dasherize()\n=> '-moz-transform'\n```\n\n**humanize** _.humanize(string)\n\nConverts an underscored, camelized, or dasherized string into a humanized one.\nAlso removes beginning and ending whitespace, and removes the postfix '_id'.\n\n```javascript\n_(' capitalize dash-CamelCase_underscore trim ').humanize()\n=> 'Capitalize dash camel case underscore trim'\n```\n\n**trim** _.trim(string, [characters])\n\ntrims defined characters from begining and ending of the string.\nDefaults to whitespace characters.\n\n```javascript\n_.trim(\" foobar \")\n=> \"foobar\"\n\n_.trim(\"_-foobar-_\", \"_-\")\n=> \"foobar\"\n```\n\n\n**ltrim** _.ltrim(string, [characters])\n\nLeft trim. Similar to trim, but only for left side.\n\n\n**rtrim** _.rtrim(string, [characters])\n\nRight trim. Similar to trim, but only for right side.\n\n**truncate** _.truncate(string, length, truncateString)\n\n```javascript\n_('Hello world').truncate(5)\n=> 'Hello...'\n\n_('Hello').truncate(10)\n=> 'Hello'\n```\n\n**prune** _.prune(string, length, pruneString)\n\nElegant version of truncate.\nMakes sure the pruned string does not exceed the original length.\nAvoid half-chopped words when truncating.\n\n```javascript\n_('Hello, world').prune(5)\n=> 'Hello...'\n\n_('Hello, world').prune(8)\n=> 'Hello...'\n\n_('Hello, world').prune(5, ' (read a lot more)')\n=> 'Hello, world' (as adding \"(read a lot more)\" would be longer than the original string)\n\n_('Hello, cruel world').prune(15)\n=> 'Hello, cruel...'\n\n_('Hello').prune(10)\n=> 'Hello'\n```\n\n**words** _.words(str, delimiter=/\\s+/)\n\nSplit string by delimiter (String or RegExp), /\\s+/ by default.\n\n```javascript\n_.words(\" I love you \")\n=> [\"I\",\"love\",\"you\"]\n\n_.words(\"I_love_you\", \"_\")\n=> [\"I\",\"love\",\"you\"]\n\n_.words(\"I-love-you\", /-/)\n=> [\"I\",\"love\",\"you\"]\n\n_.words(\" \")\n=> []\n```\n\n**sprintf** _.sprintf(string format, *arguments)\n\nC like string formatting.\nCredits goes to [Alexandru Marasteanu][o].\nFor more detailed documentation, see the [original page][o].\n\n[o]: http://www.diveintojavascript.com/projects/sprintf-for-javascript\n\n```javascript\n_.sprintf(\"%.1f\", 1.17)\n\"1.2\"\n```\n\n**pad** _.pad(str, length, [padStr, type])\n\npads the `str` with characters until the total string length is equal to the passed `length` parameter. By default, pads on the **left** with the space char (`\" \"`). `padStr` is truncated to a single character if necessary.\n\n```javascript\n_.pad(\"1\", 8)\n-> \" 1\";\n\n_.pad(\"1\", 8, '0')\n-> \"00000001\";\n\n_.pad(\"1\", 8, '0', 'right')\n-> \"10000000\";\n\n_.pad(\"1\", 8, '0', 'both')\n-> \"00001000\";\n\n_.pad(\"1\", 8, 'bleepblorp', 'both')\n-> \"bbbb1bbb\";\n```\n\n**lpad** _.lpad(str, length, [padStr])\n\nleft-pad a string. Alias for `pad(str, length, padStr, 'left')`\n\n```javascript\n_.lpad(\"1\", 8, '0')\n-> \"00000001\";\n```\n\n**rpad** _.rpad(str, length, [padStr])\n\nright-pad a string. Alias for `pad(str, length, padStr, 'right')`\n\n```javascript\n_.rpad(\"1\", 8, '0')\n-> \"10000000\";\n```\n\n**lrpad** _.lrpad(str, length, [padStr])\n\nleft/right-pad a string. Alias for `pad(str, length, padStr, 'both')`\n\n```javascript\n_.lrpad(\"1\", 8, '0')\n-> \"00001000\";\n```\n\n**center** alias for **lrpad**\n\n**ljust** alias for *rpad*\n\n**rjust** alias for *lpad*\n\n**toNumber** _.toNumber(string, [decimals])\n\nParse string to number. Returns NaN if string can't be parsed to number.\n\n```javascript\n_('2.556').toNumber()\n=> 3\n\n_('2.556').toNumber(1)\n=> 2.6\n```\n\n**strRight** _.strRight(string, pattern)\n\nSearches a string from left to right for a pattern and returns a substring consisting of the characters in the string that are to the right of the pattern or all string if no match found.\n\n```javascript\n_('This_is_a_test_string').strRight('_')\n=> \"is_a_test_string\";\n```\n\n**strRightBack** _.strRightBack(string, pattern)\n\nSearches a string from right to left for a pattern and returns a substring consisting of the characters in the string that are to the right of the pattern or all string if no match found.\n\n```javascript\n_('This_is_a_test_string').strRightBack('_')\n=> \"string\";\n```\n\n**strLeft** _.strLeft(string, pattern)\n\nSearches a string from left to right for a pattern and returns a substring consisting of the characters in the string that are to the left of the pattern or all string if no match found.\n\n```javascript\n_('This_is_a_test_string').strLeft('_')\n=> \"This\";\n```\n\n**strLeftBack** _.strLeftBack(string, pattern)\n\nSearches a string from right to left for a pattern and returns a substring consisting of the characters in the string that are to the left of the pattern or all string if no match found.\n\n```javascript\n_('This_is_a_test_string').strLeftBack('_')\n=> \"This_is_a_test\";\n```\n\n**stripTags**\n\nRemoves all html tags from string.\n\n```javascript\n_('a link').stripTags()\n=> 'a link'\n\n_('a link').stripTags()\n=> 'a linkalert(\"hello world!\")'\n```\n\n**toSentence** _.toSentence(array, [delimiter, lastDelimiter])\n\nJoin an array into a human readable sentence.\n\n```javascript\n_.toSentence(['jQuery', 'Mootools', 'Prototype'])\n=> 'jQuery, Mootools and Prototype';\n\n_.toSentence(['jQuery', 'Mootools', 'Prototype'], ', ', ' unt ')\n=> 'jQuery, Mootools unt Prototype';\n```\n\n**toSentenceSerial** _.toSentenceSerial(array, [delimiter, lastDelimiter])\n\nThe same as `toSentence`, but adjusts delimeters to use [Serial comma](http://en.wikipedia.org/wiki/Serial_comma).\n\n```javascript\n_.toSentenceSerial(['jQuery', 'Mootools'])\n=> 'jQuery and Mootools';\n\n_.toSentenceSerial(['jQuery', 'Mootools', 'Prototype'])\n=> 'jQuery, Mootools, and Prototype'\n\n_.toSentenceSerial(['jQuery', 'Mootools', 'Prototype'], ', ', ' unt ');\n=> 'jQuery, Mootools, unt Prototype';\n```\n\n**repeat** _.repeat(string, count, [separator])\n\nRepeats a string count times.\n\n```javascript\n_.repeat(\"foo\", 3)\n=> 'foofoofoo';\n\n_.repeat(\"foo\", 3, \"bar\")\n=> 'foobarfoobarfoo'\n```\n\n**surround** _.surround(string, wrap)\n\nSurround a string with another string.\n\n```javascript\n_.surround(\"foo\", \"ab\")\n=> 'abfooab';\n```\n\n**quote** _.quote(string, quoteChar) or _.q(string, quoteChar)\n\nQuotes a string. `quoteChar` defaults to `\"`.\n\n```javascript\n_.quote('foo', quoteChar)\n=> '\"foo\"';\n```\n**unquote** _.unquote(string, quoteChar)\n\nUnquotes a string. `quoteChar` defaults to `\"`.\n\n```javascript\n_.unquote('\"foo\"')\n=> 'foo';\n_.unquote(\"'foo'\", \"'\")\n=> 'foo';\n```\n\n\n**slugify** _.slugify(string)\n\nTransform text into a URL slug. Replaces whitespaces, accentuated, and special characters with a dash.\n\n```javascript\n_.slugify(\"Un éléphant à l'orée du bois\")\n=> 'un-elephant-a-loree-du-bois';\n```\n\n***Caution: this function is charset dependent***\n\n**naturalCmp** array.sort(_.naturalCmp)\n\nNaturally sort strings like humans would do.\n\n```javascript\n['foo20', 'foo5'].sort(_.naturalCmp)\n=> [ 'foo5', 'foo20' ]\n```\n\n**toBoolean** _.toBoolean(string) or _.toBool(string)\n\nTurn strings that can be commonly considered as booleas to real booleans. Such as \"true\", \"false\", \"1\" and \"0\". This function is case insensitive.\n\n```javascript\n_.toBoolean(\"true\")\n=> true\n_.toBoolean(\"FALSE\")\n=> false\n_.toBoolean(\"random\")\n=> undefined\n```\n\nIt can be customized by giving arrays of truth and falsy value matcher as parameters. Matchers can be also RegExp objects.\n\n```javascript\n_.toBoolean(\"truthy\", [\"truthy\"], [\"falsy\"])\n=> true\n_.toBoolean(\"true only at start\", [/^true/])\n=> true\n```\n\n## Roadmap ##\n\nAny suggestions or bug reports are welcome. Just email me or more preferably open an issue.\n\n#### Problems\n\nWe lose two things for `include` and `reverse` methods from `_.string`:\n\n* Calls like `_('foobar').include('bar')` aren't available;\n* Chaining isn't available too.\n\nBut if you need this functionality you can create aliases for conflict functions which will be convenient for you:\n\n```javascript\n_.mixin({\n includeString: _.str.include,\n reverseString: _.str.reverse\n})\n\n// Now wrapper calls and chaining are available.\n_('foobar').chain().reverseString().includeString('rab').value()\n```\n\n#### Standalone Usage\n\nIf you are using Underscore.string without Underscore. You also have `_.string` namespace for it and `_.str` alias\nBut of course you can just reassign `_` variable with `_.string`\n\n```javascript\n_ = _.string\n```\n\n## Changelog ##\n\n### 2.3.3 ###\n\n* Add `toBoolean`\n* Add `unquote`\n* Add quote char option to `quote`\n* Support dash-separated words in `titleize`\n\n### 2.3.2 ###\n\n* Add `naturalCmp`\n* Bug fix to `camelize`\n* Add ă, ș, ț and ś to `slugify`\n* Doc updates\n* Add support for [component](http://component.io/)\n* [Full changelog](https://github.com/epeli/underscore.string/compare/v2.3.1...v2.3.2)\n\n### 2.3.1 ###\n\n* Bug fixes to `escapeHTML`, `classify`, `substr`\n* Faster `count`\n* Documentation fixes\n* [Full changelog](https://github.com/epeli/underscore.string/compare/v2.3.0...v2.3.1)\n\n### 2.3.0 ###\n\n* Added `numberformat` method\n* Added `levenshtein` method (Levenshtein distance calculation)\n* Added `swapCase` method\n* Changed default behavior of `words` method\n* Added `toSentenceSerial` method\n* Added `surround` and `quote` methods\n\n### 2.2.1 ###\n\n* Same as 2.2.0 (2.2.0rc on npm) to fix some npm drama\n\n### 2.2.0 ###\n\n* Capitalize method behavior changed\n* Various perfomance tweaks\n\n### 2.1.1###\n\n* Fixed words method bug\n* Added classify method\n\n### 2.1.0 ###\n\n* AMD support\n* Added toSentence method\n* Added slugify method\n* Lots of speed optimizations\n\n### 2.0.0 ###\n\n* Added prune, humanize functions\n* Added _.string (_.str) namespace for Underscore.string library\n* Removed includes function\n\nFor upgrading to this version you need to mix in Underscore.string library to Underscore object:\n\n```javascript\n_.mixin(_.string.exports());\n```\n\nand all non-conflict Underscore.string functions will be available through Underscore object.\nAlso function `includes` has been removed, you should replace this function by `_.str.include`\nor create alias `_.includes = _.str.include` and all your code will work fine.\n\n### 1.1.6 ###\n\n* Fixed reverse and truncate\n* Added isBlank, stripTags, inlude(alias for includes)\n* Added uglifier compression\n\n### 1.1.5 ###\n\n* Added strRight, strRightBack, strLeft, strLeftBack\n\n### 1.1.4 ###\n\n* Added pad, lpad, rpad, lrpad methods and aliases center, ljust, rjust\n* Integration with Underscore 1.1.6\n\n### 1.1.3 ###\n\n* Added methods: underscored, camelize, dasherize\n* Support newer version of npm\n\n### 1.1.2 ###\n\n* Created functions: lines, chars, words functions\n\n### 1.0.2 ###\n\n* Created integration test suite with underscore.js 1.1.4 (now it's absolutely compatible)\n* Removed 'reverse' function, because this function override underscore.js 'reverse'\n\n## Contribute ##\n\n* Fork & pull request. Don't forget about tests.\n* If you planning add some feature please create issue before.\n\nOtherwise changes will be rejected.\n\n## Contributors list ##\n[Can be found here](https://github.com/epeli/underscore.string/graphs/contributors).\n\n\n## Licence ##\n\nThe MIT License\n\nCopyright (c) 2011 Esa-Matti Suuronen esa-matti@suuronen.org\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in\nall copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\nTHE SOFTWARE.\n",
- "readmeFilename": "README.markdown",
- "_id": "underscore.string@2.3.3",
- "_from": "underscore.string@~2.3.1",
- "scripts": {}
+ "scripts": {
+ "test": "gulp test"
+ },
+ "devDependencies": {
+ "gulp": "~3.8.10",
+ "gulp-uglify": "~1.0.1",
+ "gulp-qunit": "~1.0.0",
+ "gulp-clean": "~0.3.1",
+ "gulp-rename": "~1.2.0"
+ },
+ "_id": "underscore.string@2.4.0",
+ "dist": {
+ "shasum": "8cdd8fbac4e2d2ea1e7e2e8097c42f442280f85b",
+ "tarball": "http://registry.npmjs.org/underscore.string/-/underscore.string-2.4.0.tgz"
+ },
+ "_from": "underscore.string@>=2.4.0 <2.5.0",
+ "_npmVersion": "1.3.24",
+ "_npmUser": {
+ "name": "epeli",
+ "email": "esa-matti@suuronen.org"
+ },
+ "maintainers": [
+ {
+ "name": "edtsech",
+ "email": "edtsech@gmail.com"
+ },
+ {
+ "name": "rwz",
+ "email": "rwz@duckroll.ru"
+ },
+ {
+ "name": "epeli",
+ "email": "esa-matti@suuronen.org"
+ }
+ ],
+ "_shasum": "8cdd8fbac4e2d2ea1e7e2e8097c42f442280f85b",
+ "_resolved": "https://registry.npmjs.org/underscore.string/-/underscore.string-2.4.0.tgz",
+ "readme": "ERROR: No README data found!"
}
diff --git a/node_modules/grunt-istanbul/node_modules/istanbul/node_modules/js-yaml/node_modules/argparse/node_modules/underscore.string/test/run-qunit.js b/node_modules/grunt-istanbul/node_modules/istanbul/node_modules/js-yaml/node_modules/argparse/node_modules/underscore.string/test/run-qunit.js
deleted file mode 100644
index 44a2167..0000000
--- a/node_modules/grunt-istanbul/node_modules/istanbul/node_modules/js-yaml/node_modules/argparse/node_modules/underscore.string/test/run-qunit.js
+++ /dev/null
@@ -1,45 +0,0 @@
-function waitFor(test, complete, timeout) {
- var result, start = new Date().getTime()
- setInterval(function interval() {
- if ((new Date().getTime() - start < timeout) && !result) {
- result = test()
- } else {
- if (!result) {
- phantom.exit(1)
- } else {
- complete()
- clearInterval(interval)
- }
- }
- }, 100)
-}
-
-
-var fs = require('fs'), page = require('webpage').create();
-var url = 'file://localhost' + fs.workingDirectory + '/' + phantom.args[0];
-
-page.onConsoleMessage = function(msg) {
- console.log(msg)
-}
-
-page.open(url, function(status) {
- waitFor(function() {
- return page.evaluate(function(){
- var el = document.getElementById('qunit-testresult')
- return el && el.innerText.match('completed')
- })
- }, function() {
- var failures = page.evaluate(function() {
- var el = document.getElementById('qunit-testresult'),
- fails = document.getElementsByClassName('fail')
-
- for (var i = 0; i < fails.length; i++)
- console.log(fails[i].innerText)
-
- console.log(el.innerText)
-
- return parseInt(el.getElementsByClassName('failed')[0].innerHTML)
- })
- phantom.exit(failures > 0 ? 1 : 0)
- }, 10000)
-})
\ No newline at end of file
diff --git a/node_modules/grunt-istanbul/node_modules/istanbul/node_modules/js-yaml/node_modules/argparse/node_modules/underscore.string/test/speed.js b/node_modules/grunt-istanbul/node_modules/istanbul/node_modules/js-yaml/node_modules/argparse/node_modules/underscore.string/test/speed.js
deleted file mode 100644
index 9ceeea7..0000000
--- a/node_modules/grunt-istanbul/node_modules/istanbul/node_modules/js-yaml/node_modules/argparse/node_modules/underscore.string/test/speed.js
+++ /dev/null
@@ -1,148 +0,0 @@
-(function() {
-
- JSLitmus.test('levenshtein', function() {
- return [
- _.levenshtein('pineapple', 'potato'),
- _.levenshtein('seven', 'eight'),
- _.levenshtein('the very same string', 'the very same string'),
- _.levenshtein('very very very long string', 'something completely different')
- ];
- });
-
-
- JSLitmus.test('trimNoNative', function() {
- return _.trim(" foobar ", " ");
- });
-
- JSLitmus.test('trim', function() {
- return _.trim(" foobar ");
- });
-
- JSLitmus.test('trim object-oriented', function() {
- return _(" foobar ").trim();
- });
-
- JSLitmus.test('trim jQuery', function() {
- return jQuery.trim(" foobar ");
- });
-
- JSLitmus.test('ltrimp', function() {
- return _.ltrim(" foobar ", " ");
- });
-
- JSLitmus.test('rtrimp', function() {
- return _.rtrim(" foobar ", " ");
- });
-
- JSLitmus.test('startsWith', function() {
- return _.startsWith("foobar", "foo");
- });
-
- JSLitmus.test('endsWith', function() {
- return _.endsWith("foobar", "xx");
- });
-
- JSLitmus.test('chop', function(){
- return _('whitespace').chop(2);
- });
-
- JSLitmus.test('count', function(){
- return _('Hello worls').count('l');
- });
-
- JSLitmus.test('insert', function() {
- return _('Hello ').insert(6, 'world');
- });
-
- JSLitmus.test('splice', function() {
- return _('https://edtsech@bitbucket.org/edtsech/underscore.strings').splice(30, 7, 'epeli');
- });
-
- JSLitmus.test('succ', function(){
- var let = 'a', alphabet = [];
-
- for (var i=0; i < 26; i++) {
- alphabet.push(let);
- let = _(let).succ();
- }
-
- return alphabet;
- });
-
- JSLitmus.test('titleize', function(){
- return _('the titleize string method').titleize();
- });
-
- JSLitmus.test('truncate', function(){
- return _('Hello world').truncate(5);
- });
-
- JSLitmus.test('prune', function(){
- return _('Hello world').prune(5);
- });
-
- JSLitmus.test('isBlank', function(){
- return _('').isBlank();
- });
-
- JSLitmus.test('escapeHTML', function(){
- _('Blah blah blah
').escapeHTML();
- });
-
- JSLitmus.test('unescapeHTML', function(){
- _('<div>Blah blah blah</div>').unescapeHTML();
- });
-
- JSLitmus.test('reverse', function(){
- _('Hello World').reverse();
- });
-
- JSLitmus.test('pad default', function(){
- _('foo').pad(12);
- });
-
- JSLitmus.test('pad hash left', function(){
- _('foo').pad(12, '#');
- });
-
- JSLitmus.test('pad hash right', function(){
- _('foo').pad(12, '#', 'right');
- });
-
- JSLitmus.test('pad hash both', function(){
- _('foo').pad(12, '#', 'both');
- });
-
- JSLitmus.test('pad hash both longPad', function(){
- _('foo').pad(12, 'f00f00f00', 'both');
- });
-
- JSLitmus.test('toNumber', function(){
- _('10.232323').toNumber(2);
- });
-
- JSLitmus.test('strRight', function(){
- _('aaa_bbb_ccc').strRight('_');
- });
-
- JSLitmus.test('strRightBack', function(){
- _('aaa_bbb_ccc').strRightBack('_');
- });
-
- JSLitmus.test('strLeft', function(){
- _('aaa_bbb_ccc').strLeft('_');
- });
-
- JSLitmus.test('strLeftBack', function(){
- _('aaa_bbb_ccc').strLeftBack('_');
- });
-
- JSLitmus.test('join', function(){
- _('separator').join(1, 2, 3, 4, 5, 6, 7, 8, 'foo', 'bar', 'lol', 'wut');
- });
-
- JSLitmus.test('slugify', function(){
- _("Un éléphant à l'orée du bois").slugify();
- });
-
-})();
diff --git a/node_modules/grunt-istanbul/node_modules/istanbul/node_modules/js-yaml/node_modules/argparse/node_modules/underscore.string/test/strings.js b/node_modules/grunt-istanbul/node_modules/istanbul/node_modules/js-yaml/node_modules/argparse/node_modules/underscore.string/test/strings.js
deleted file mode 100644
index 77364f2..0000000
--- a/node_modules/grunt-istanbul/node_modules/istanbul/node_modules/js-yaml/node_modules/argparse/node_modules/underscore.string/test/strings.js
+++ /dev/null
@@ -1,685 +0,0 @@
-$(document).ready(function() {
-
- // Include Underscore.string methods to Underscore namespace
- _.mixin(_.str.exports());
-
- module('String extensions');
-
- test('Strings: naturalSort', function() {
- var arr = ['foo2', 'foo1', 'foo10', 'foo30', 'foo100', 'foo10bar'],
- sorted = ['foo1', 'foo2', 'foo10', 'foo10bar', 'foo30', 'foo100'];
- deepEqual(arr.sort(_.naturalCmp), sorted);
- });
-
- test('Strings: trim', function() {
- equal(_.trim(123), '123', 'Non string');
- equal(_(' foo').trim(), 'foo');
- equal(_('foo ').trim(), 'foo');
- equal(_(' foo ').trim(), 'foo');
- equal(_(' foo ').trim(), 'foo');
- equal(_(' foo ').trim(' '), 'foo', 'Manually set whitespace');
- equal(_('\t foo \t ').trim(/\s/), 'foo', 'Manually set RegExp /\\s+/');
-
- equal(_('ffoo').trim('f'), 'oo');
- equal(_('ooff').trim('f'), 'oo');
- equal(_('ffooff').trim('f'), 'oo');
-
-
- equal(_('_-foobar-_').trim('_-'), 'foobar');
-
- equal(_('http://foo/').trim('/'), 'http://foo');
- equal(_('c:\\').trim('\\'), 'c:');
-
- equal(_(123).trim(), '123');
- equal(_(123).trim(3), '12');
- equal(_('').trim(), '', 'Trim empty string should return empty string');
- equal(_(null).trim(), '', 'Trim null should return empty string');
- equal(_(undefined).trim(), '', 'Trim undefined should return empty string');
- });
-
- test('String: levenshtein', function() {
- equal(_.levenshtein('Godfather', 'Godfather'), 0);
- equal(_.levenshtein('Godfather', 'Godfathe'), 1);
- equal(_.levenshtein('Godfather', 'odfather'), 1);
- equal(_.levenshtein('Godfather', 'Gdfthr'), 3);
- equal(_.levenshtein('seven', 'eight'), 5);
- equal(_.levenshtein('123', 123), 0);
- equal(_.levenshtein(321, '321'), 0);
- equal(_.levenshtein('lol', null), 3);
- equal(_.levenshtein('lol'), 3);
- equal(_.levenshtein(null, 'lol'), 3);
- equal(_.levenshtein(undefined, 'lol'), 3);
- equal(_.levenshtein(), 0);
- });
-
- test('Strings: ltrim', function() {
- equal(_(' foo').ltrim(), 'foo');
- equal(_(' foo').ltrim(), 'foo');
- equal(_('foo ').ltrim(), 'foo ');
- equal(_(' foo ').ltrim(), 'foo ');
- equal(_('').ltrim(), '', 'ltrim empty string should return empty string');
- equal(_(null).ltrim(), '', 'ltrim null should return empty string');
- equal(_(undefined).ltrim(), '', 'ltrim undefined should return empty string');
-
- equal(_('ffoo').ltrim('f'), 'oo');
- equal(_('ooff').ltrim('f'), 'ooff');
- equal(_('ffooff').ltrim('f'), 'ooff');
-
- equal(_('_-foobar-_').ltrim('_-'), 'foobar-_');
-
- equal(_(123).ltrim(1), '23');
- });
-
- test('Strings: rtrim', function() {
- equal(_('http://foo/').rtrim('/'), 'http://foo', 'clean trailing slash');
- equal(_(' foo').rtrim(), ' foo');
- equal(_('foo ').rtrim(), 'foo');
- equal(_('foo ').rtrim(), 'foo');
- equal(_('foo bar ').rtrim(), 'foo bar');
- equal(_(' foo ').rtrim(), ' foo');
-
- equal(_('ffoo').rtrim('f'), 'ffoo');
- equal(_('ooff').rtrim('f'), 'oo');
- equal(_('ffooff').rtrim('f'), 'ffoo');
-
- equal(_('_-foobar-_').rtrim('_-'), '_-foobar');
-
- equal(_(123).rtrim(3), '12');
- equal(_('').rtrim(), '', 'rtrim empty string should return empty string');
- equal(_(null).rtrim(), '', 'rtrim null should return empty string');
- });
-
- test('Strings: capitalize', function() {
- equal(_('fabio').capitalize(), 'Fabio', 'First letter is upper case');
- equal(_.capitalize('fabio'), 'Fabio', 'First letter is upper case');
- equal(_.capitalize('FOO'), 'FOO', 'Other letters unchanged');
- equal(_(123).capitalize(), '123', 'Non string');
- equal(_.capitalize(''), '', 'Capitalizing empty string returns empty string');
- equal(_.capitalize(null), '', 'Capitalizing null returns empty string');
- equal(_.capitalize(undefined), '', 'Capitalizing undefined returns empty string');
- });
-
- test('Strings: join', function() {
- equal(_.join('', 'foo', 'bar'), 'foobar', 'basic join');
- equal(_.join('', 1, 'foo', 2), '1foo2', 'join numbers and strings');
- equal(_.join(' ','foo', 'bar'), 'foo bar', 'join with spaces');
- equal(_.join('1', '2', '2'), '212', 'join number strings');
- equal(_.join(1, 2, 2), '212', 'join numbers');
- equal(_.join('','foo', null), 'foo', 'join null with string returns string');
- equal(_.join(null,'foo', 'bar'), 'foobar', 'join strings with null returns string');
- equal(_(' ').join('foo', 'bar'), 'foo bar', 'join object oriented');
- });
-
- test('Strings: reverse', function() {
- equal(_.str.reverse('foo'), 'oof' );
- equal(_.str.reverse('foobar'), 'raboof' );
- equal(_.str.reverse('foo bar'), 'rab oof' );
- equal(_.str.reverse('saippuakauppias'), 'saippuakauppias' );
- equal(_.str.reverse(123), '321', 'Non string');
- equal(_.str.reverse(123.45), '54.321', 'Non string');
- equal(_.str.reverse(''), '', 'reversing empty string returns empty string' );
- equal(_.str.reverse(null), '', 'reversing null returns empty string' );
- equal(_.str.reverse(undefined), '', 'reversing undefined returns empty string' );
- });
-
- test('Strings: clean', function() {
- equal(_(' foo bar ').clean(), 'foo bar');
- equal(_(123).clean(), '123');
- equal(_('').clean(), '', 'claning empty string returns empty string');
- equal(_(null).clean(), '', 'claning null returns empty string');
- equal(_(undefined).clean(), '', 'claning undefined returns empty string');
- });
-
- test('Strings: sprintf', function() {
- // Should be very tested function already. Thanks to
- // http://www.diveintojavascript.com/projects/sprintf-for-javascript
- equal(_.sprintf('Hello %s', 'me'), 'Hello me', 'basic');
- equal(_('Hello %s').sprintf('me'), 'Hello me', 'object');
- equal(_('hello %s').chain().sprintf('me').capitalize().value(), 'Hello me', 'Chaining works');
- equal(_.sprintf('%.1f', 1.22222), '1.2', 'round');
- equal(_.sprintf('%.1f', 1.17), '1.2', 'round 2');
- equal(_.sprintf('%(id)d - %(name)s', {id: 824, name: 'Hello World'}), '824 - Hello World', 'Named replacements work');
- equal(_.sprintf('%(args[0].id)d - %(args[1].name)s', {args: [{id: 824}, {name: 'Hello World'}]}), '824 - Hello World', 'Named replacements with arrays work');
- });
-
-
- test('Strings: vsprintf', function() {
- equal(_.vsprintf('Hello %s', ['me']), 'Hello me', 'basic');
- equal(_('Hello %s').vsprintf(['me']), 'Hello me', 'object');
- equal(_('hello %s').chain().vsprintf(['me']).capitalize().value(), 'Hello me', 'Chaining works');
- equal(_.vsprintf('%.1f', [1.22222]), '1.2', 'round');
- equal(_.vsprintf('%.1f', [1.17]), '1.2', 'round 2');
- equal(_.vsprintf('%(id)d - %(name)s', [{id: 824, name: 'Hello World'}]), '824 - Hello World', 'Named replacement works');
- equal(_.vsprintf('%(args[0].id)d - %(args[1].name)s', [{args: [{id: 824}, {name: 'Hello World'}]}]), '824 - Hello World', 'Named replacement with arrays works');
- });
-
- test('Strings: startsWith', function() {
- ok(_('foobar').startsWith('foo'), 'foobar starts with foo');
- ok(!_('oobar').startsWith('foo'), 'oobar does not start with foo');
- ok(_(12345).startsWith(123), '12345 starts with 123');
- ok(!_(2345).startsWith(123), '2345 does not start with 123');
- ok(_('').startsWith(''), 'empty string starts with empty string');
- ok(_(null).startsWith(''), 'null starts with empty string');
- ok(!_(null).startsWith('foo'), 'null starts with foo');
- });
-
- test('Strings: endsWith', function() {
- ok(_('foobar').endsWith('bar'), 'foobar ends with bar');
- ok(_.endsWith('foobar', 'bar'), 'foobar ends with bar');
- ok(_.endsWith('00018-0000062.Plone.sdh264.1a7264e6912a91aa4a81b64dc5517df7b8875994.mp4', 'mp4'), 'endsWith .mp4');
- ok(!_('fooba').endsWith('bar'), 'fooba does not end with bar');
- ok(_.endsWith(12345, 45), '12345 ends with 45');
- ok(!_.endsWith(12345, 6), '12345 does not end with 6');
- ok(_('').endsWith(''), 'empty string ends with empty string');
- ok(_(null).endsWith(''), 'null ends with empty string');
- ok(!_(null).endsWith('foo'), 'null ends with foo');
- });
-
- test('Strings: include', function() {
- ok(_.str.include('foobar', 'bar'), 'foobar includes bar');
- ok(!_.str.include('foobar', 'buzz'), 'foobar does not includes buzz');
- ok(_.str.include(12345, 34), '12345 includes 34');
- ok(!_.str.contains(12345, 6), '12345 does not includes 6');
- ok(!_.str.include('', 34), 'empty string includes 34');
- ok(!_.str.include(null, 34), 'null includes 34');
- ok(_.str.include(null, ''), 'null includes empty string');
- });
-
- test('String: chop', function(){
- ok(_('whitespace').chop(2).length === 5, 'output [wh, it, es, pa, ce]');
- ok(_('whitespace').chop(3).length === 4, 'output [whi, tes, pac, e]');
- ok(_('whitespace').chop()[0].length === 10, 'output [whitespace]');
- ok(_(12345).chop(1).length === 5, 'output [1, 2, 3, 4, 5]');
- });
-
- test('String: clean', function(){
- equal(_.clean(' foo bar '), 'foo bar');
- equal(_.clean(''), '');
- equal(_.clean(null), '');
- equal(_.clean(1), '1');
- });
-
- test('String: count', function(){
- equal(_('Hello world').count('l'), 3);
- equal(_('Hello world').count('Hello'), 1);
- equal(_('Hello world').count('foo'), 0);
- equal(_('x.xx....x.x').count('x'), 5);
- equal(_('').count('x'), 0);
- equal(_(null).count('x'), 0);
- equal(_(undefined).count('x'), 0);
- equal(_(12345).count(1), 1);
- equal(_(11345).count(1), 2);
- });
-
- test('String: insert', function(){
- equal(_('Hello ').insert(6, 'Jessy'), 'Hello Jessy');
- equal(_('Hello ').insert(100, 'Jessy'), 'Hello Jessy');
- equal(_('').insert(100, 'Jessy'), 'Jessy');
- equal(_(null).insert(100, 'Jessy'), 'Jessy');
- equal(_(undefined).insert(100, 'Jessy'), 'Jessy');
- equal(_(12345).insert(6, 'Jessy'), '12345Jessy');
- });
-
- test('String: splice', function(){
- equal(_('https://edtsech@bitbucket.org/edtsech/underscore.strings').splice(30, 7, 'epeli'),
- 'https://edtsech@bitbucket.org/epeli/underscore.strings');
- equal(_.splice(12345, 1, 2, 321), '132145', 'Non strings');
- });
-
- test('String: succ', function(){
- equal(_('a').succ(), 'b');
- equal(_('A').succ(), 'B');
- equal(_('+').succ(), ',');
- equal(_(1).succ(), '2');
- });
-
- test('String: titleize', function(){
- equal(_('the titleize string method').titleize(), 'The Titleize String Method');
- equal(_('the titleize string method').titleize(), 'The Titleize String Method');
- equal(_('').titleize(), '', 'Titleize empty string returns empty string');
- equal(_(null).titleize(), '', 'Titleize null returns empty string');
- equal(_(undefined).titleize(), '', 'Titleize undefined returns empty string');
- equal(_('let\'s have some fun').titleize(), 'Let\'s Have Some Fun');
- equal(_('a-dash-separated-string').titleize(), 'A-Dash-Separated-String');
- equal(_('A-DASH-SEPARATED-STRING').titleize(), 'A-Dash-Separated-String');
- equal(_(123).titleize(), '123');
- });
-
- test('String: camelize', function(){
- equal(_('the_camelize_string_method').camelize(), 'theCamelizeStringMethod');
- equal(_('-the-camelize-string-method').camelize(), 'TheCamelizeStringMethod');
- equal(_('the camelize string method').camelize(), 'theCamelizeStringMethod');
- equal(_(' the camelize string method').camelize(), 'theCamelizeStringMethod');
- equal(_('the camelize string method').camelize(), 'theCamelizeStringMethod');
- equal(_('').camelize(), '', 'Camelize empty string returns empty string');
- equal(_(null).camelize(), '', 'Camelize null returns empty string');
- equal(_(undefined).camelize(), '', 'Camelize undefined returns empty string');
- equal(_(123).camelize(), '123');
- });
-
- test('String: underscored', function(){
- equal(_('the-underscored-string-method').underscored(), 'the_underscored_string_method');
- equal(_('theUnderscoredStringMethod').underscored(), 'the_underscored_string_method');
- equal(_('TheUnderscoredStringMethod').underscored(), 'the_underscored_string_method');
- equal(_(' the underscored string method').underscored(), 'the_underscored_string_method');
- equal(_('').underscored(), '');
- equal(_(null).underscored(), '');
- equal(_(undefined).underscored(), '');
- equal(_(123).underscored(), '123');
- });
-
- test('String: dasherize', function(){
- equal(_('the_dasherize_string_method').dasherize(), 'the-dasherize-string-method');
- equal(_('TheDasherizeStringMethod').dasherize(), '-the-dasherize-string-method');
- equal(_('thisIsATest').dasherize(), 'this-is-a-test');
- equal(_('this Is A Test').dasherize(), 'this-is-a-test');
- equal(_('thisIsATest123').dasherize(), 'this-is-a-test123');
- equal(_('123thisIsATest').dasherize(), '123this-is-a-test');
- equal(_('the dasherize string method').dasherize(), 'the-dasherize-string-method');
- equal(_('the dasherize string method ').dasherize(), 'the-dasherize-string-method');
- equal(_('téléphone').dasherize(), 'téléphone');
- equal(_('foo$bar').dasherize(), 'foo$bar');
- equal(_('').dasherize(), '');
- equal(_(null).dasherize(), '');
- equal(_(undefined).dasherize(), '');
- equal(_(123).dasherize(), '123');
- });
-
- test('String: camelize', function(){
- equal(_.camelize('-moz-transform'), 'MozTransform');
- equal(_.camelize('webkit-transform'), 'webkitTransform');
- equal(_.camelize('under_scored'), 'underScored');
- equal(_.camelize(' with spaces'), 'withSpaces');
- equal(_('').camelize(), '');
- equal(_(null).camelize(), '');
- equal(_(undefined).camelize(), '');
- equal(_("_som eWeird---name-").camelize(), 'SomEWeirdName');
- });
-
- test('String: join', function(){
- equal(_.join(1, 2, 3, 4), '21314');
- equal(_.join('|', 'foo', 'bar', 'baz'), 'foo|bar|baz');
- equal(_.join('',2,3,null), '23');
- equal(_.join(null,2,3), '23');
- });
-
- test('String: classify', function(){
- equal(_.classify(1), '1');
- equal(_('some_class_name').classify(), 'SomeClassName');
- equal(_('my wonderfull class_name').classify(), 'MyWonderfullClassName');
- equal(_('my wonderfull.class.name').classify(), 'MyWonderfullClassName');
- });
-
- test('String: humanize', function(){
- equal(_('the_humanize_string_method').humanize(), 'The humanize string method');
- equal(_('ThehumanizeStringMethod').humanize(), 'Thehumanize string method');
- equal(_('the humanize string method').humanize(), 'The humanize string method');
- equal(_('the humanize_id string method_id').humanize(), 'The humanize id string method');
- equal(_('the humanize string method ').humanize(), 'The humanize string method');
- equal(_(' capitalize dash-CamelCase_underscore trim ').humanize(), 'Capitalize dash camel case underscore trim');
- equal(_(123).humanize(), '123');
- equal(_('').humanize(), '');
- equal(_(null).humanize(), '');
- equal(_(undefined).humanize(), '');
- });
-
- test('String: truncate', function(){
- equal(_('Hello world').truncate(6, 'read more'), 'Hello read more');
- equal(_('Hello world').truncate(5), 'Hello...');
- equal(_('Hello').truncate(10), 'Hello');
- equal(_('').truncate(10), '');
- equal(_(null).truncate(10), '');
- equal(_(undefined).truncate(10), '');
- equal(_(1234567890).truncate(5), '12345...');
- });
-
- test('String: prune', function(){
- equal(_('Hello, cruel world').prune(6, ' read more'), 'Hello read more');
- equal(_('Hello, world').prune(5, 'read a lot more'), 'Hello, world');
- equal(_('Hello, world').prune(5), 'Hello...');
- equal(_('Hello, world').prune(8), 'Hello...');
- equal(_('Hello, cruel world').prune(15), 'Hello, cruel...');
- equal(_('Hello world').prune(22), 'Hello world');
- equal(_('Привет, жестокий мир').prune(6, ' read more'), 'Привет read more');
- equal(_('Привет, мир').prune(6, 'read a lot more'), 'Привет, мир');
- equal(_('Привет, мир').prune(6), 'Привет...');
- equal(_('Привет, мир').prune(8), 'Привет...');
- equal(_('Привет, жестокий мир').prune(16), 'Привет, жестокий...');
- equal(_('Привет, мир').prune(22), 'Привет, мир');
- equal(_('alksjd!!!!!!....').prune(100, ''), 'alksjd!!!!!!....');
- equal(_(123).prune(10), '123');
- equal(_(123).prune(1, 321), '321');
- equal(_('').prune(5), '');
- equal(_(null).prune(5), '');
- equal(_(undefined).prune(5), '');
- });
-
- test('String: isBlank', function(){
- ok(_('').isBlank());
- ok(_(' ').isBlank());
- ok(_('\n').isBlank());
- ok(!_('a').isBlank());
- ok(!_('0').isBlank());
- ok(!_(0).isBlank());
- ok(_('').isBlank());
- ok(_(null).isBlank());
- ok(_(undefined).isBlank());
- });
-
- test('String: escapeRegExp', function(){
- equal(_.escapeRegExp(/hello(?=\sworld)/.source), 'hello\\(\\?\\=\\\\sworld\\)', 'with lookahead');
- equal(_.escapeRegExp(/hello(?!\shell)/.source), 'hello\\(\\?\\!\\\\shell\\)', 'with negative lookahead');
- });
-
- test('String: escapeHTML', function(){
- equal(_('Blah & "blah" & \'blah\'
').escapeHTML(),
- '<div>Blah & "blah" & 'blah'</div>');
- equal(_('<').escapeHTML(), '<');
- equal(_(5).escapeHTML(), '5');
- equal(_('').escapeHTML(), '');
- equal(_(null).escapeHTML(), '');
- equal(_(undefined).escapeHTML(), '');
- });
-
- test('String: unescapeHTML', function(){
- equal(_('<div>Blah & "blah" & 'blah'</div>').unescapeHTML(),
- 'Blah & "blah" & \'blah\'
');
- equal(_('<').unescapeHTML(), '<');
- equal(_(''').unescapeHTML(), '\'');
- equal(_(''').unescapeHTML(), '\'');
- equal(_(''').unescapeHTML(), '\'');
- equal(_('J').unescapeHTML(), 'J');
- equal(_('J').unescapeHTML(), 'J');
- equal(_('J').unescapeHTML(), 'J');
- equal(_('&_#39;').unescapeHTML(), '&_#39;');
- equal(_(''_;').unescapeHTML(), ''_;');
- equal(_('&').unescapeHTML(), '&');
- equal(_('&').unescapeHTML(), '&');
- equal(_('').unescapeHTML(), '');
- equal(_(null).unescapeHTML(), '');
- equal(_(undefined).unescapeHTML(), '');
- equal(_(5).unescapeHTML(), '5');
- // equal(_(undefined).unescapeHTML(), '');
- });
-
- test('String: words', function() {
- deepEqual(_('I love you!').words(), ['I', 'love', 'you!']);
- deepEqual(_(' I love you! ').words(), ['I', 'love', 'you!']);
- deepEqual(_('I_love_you!').words('_'), ['I', 'love', 'you!']);
- deepEqual(_('I-love-you!').words(/-/), ['I', 'love', 'you!']);
- deepEqual(_(123).words(), ['123'], '123 number has one word "123".');
- deepEqual(_(0).words(), ['0'], 'Zero number has one word "0".');
- deepEqual(_('').words(), [], 'Empty strings has no words.');
- deepEqual(_(' ').words(), [], 'Blank strings has no words.');
- deepEqual(_(null).words(), [], 'null has no words.');
- deepEqual(_(undefined).words(), [], 'undefined has no words.');
- });
-
- test('String: chars', function() {
- equal(_('Hello').chars().length, 5);
- equal(_(123).chars().length, 3);
- equal(_('').chars().length, 0);
- equal(_(null).chars().length, 0);
- equal(_(undefined).chars().length, 0);
- });
-
- test('String: swapCase', function(){
- equal(_('AaBbCcDdEe').swapCase(), 'aAbBcCdDeE');
- equal(_('Hello World').swapCase(), 'hELLO wORLD');
- equal(_('').swapCase(), '');
- equal(_(null).swapCase(), '');
- equal(_(undefined).swapCase(), '');
- });
-
- test('String: lines', function() {
- equal(_('Hello\nWorld').lines().length, 2);
- equal(_('Hello World').lines().length, 1);
- equal(_(123).lines().length, 1);
- equal(_('').lines().length, 1);
- equal(_(null).lines().length, 0);
- equal(_(undefined).lines().length, 0);
- });
-
- test('String: pad', function() {
- equal(_('1').pad(8), ' 1');
- equal(_(1).pad(8), ' 1');
- equal(_('1').pad(8, '0'), '00000001');
- equal(_('1').pad(8, '0', 'left'), '00000001');
- equal(_('1').pad(8, '0', 'right'), '10000000');
- equal(_('1').pad(8, '0', 'both'), '00001000');
- equal(_('foo').pad(8, '0', 'both'), '000foo00');
- equal(_('foo').pad(7, '0', 'both'), '00foo00');
- equal(_('foo').pad(7, '!@$%dofjrofj', 'both'), '!!foo!!');
- equal(_('').pad(2), ' ');
- equal(_(null).pad(2), ' ');
- equal(_(undefined).pad(2), ' ');
- });
-
- test('String: lpad', function() {
- equal(_('1').lpad(8), ' 1');
- equal(_(1).lpad(8), ' 1');
- equal(_('1').lpad(8, '0'), '00000001');
- equal(_('1').lpad(8, '0', 'left'), '00000001');
- equal(_('').lpad(2), ' ');
- equal(_(null).lpad(2), ' ');
- equal(_(undefined).lpad(2), ' ');
- });
-
- test('String: rpad', function() {
- equal(_('1').rpad(8), '1 ');
- equal(_(1).lpad(8), ' 1');
- equal(_('1').rpad(8, '0'), '10000000');
- equal(_('foo').rpad(8, '0'), 'foo00000');
- equal(_('foo').rpad(7, '0'), 'foo0000');
- equal(_('').rpad(2), ' ');
- equal(_(null).rpad(2), ' ');
- equal(_(undefined).rpad(2), ' ');
- });
-
- test('String: lrpad', function() {
- equal(_('1').lrpad(8), ' 1 ');
- equal(_(1).lrpad(8), ' 1 ');
- equal(_('1').lrpad(8, '0'), '00001000');
- equal(_('foo').lrpad(8, '0'), '000foo00');
- equal(_('foo').lrpad(7, '0'), '00foo00');
- equal(_('foo').lrpad(7, '!@$%dofjrofj'), '!!foo!!');
- equal(_('').lrpad(2), ' ');
- equal(_(null).lrpad(2), ' ');
- equal(_(undefined).lrpad(2), ' ');
- });
-
- test('String: toNumber', function() {
- deepEqual(_('not a number').toNumber(), NaN);
- equal(_(0).toNumber(), 0);
- equal(_('0').toNumber(), 0);
- equal(_('0.0').toNumber(), 0);
- equal(_('0.1').toNumber(), 0);
- equal(_('0.1').toNumber(1), 0.1);
- equal(_(' 0.1 ').toNumber(1), 0.1);
- equal(_('0000').toNumber(), 0);
- equal(_('2.345').toNumber(), 2);
- equal(_('2.345').toNumber(NaN), 2);
- equal(_('2.345').toNumber(2), 2.35);
- equal(_('2.344').toNumber(2), 2.34);
- equal(_('2').toNumber(2), 2.00);
- equal(_(2).toNumber(2), 2.00);
- equal(_(-2).toNumber(), -2);
- equal(_('-2').toNumber(), -2);
- equal(_('').toNumber(), 0);
- equal(_(null).toNumber(), 0);
- equal(_(undefined).toNumber(), 0);
- });
-
- test('String: numberFormat', function() {
- equal(_.numberFormat(9000), '9,000');
- equal(_.numberFormat(9000, 0), '9,000');
- equal(_.numberFormat(9000, 0, '', ''), '9000');
- equal(_.numberFormat(90000, 2), '90,000.00');
- equal(_.numberFormat(1000.754), '1,001');
- equal(_.numberFormat(1000.754, 2), '1,000.75');
- equal(_.numberFormat(1000.754, 0, ',', '.'), '1.001');
- equal(_.numberFormat(1000.754, 2, ',', '.'), '1.000,75');
- equal(_.numberFormat(1000000.754, 2, ',', '.'), '1.000.000,75');
- equal(_.numberFormat(1000000000), '1,000,000,000');
- equal(_.numberFormat(100000000), '100,000,000');
- equal(_.numberFormat('not number'), '');
- equal(_.numberFormat(), '');
- equal(_.numberFormat(null, '.', ','), '');
- equal(_.numberFormat(undefined, '.', ','), '');
- equal(_.numberFormat(new Number(5000)), '5,000');
- });
-
- test('String: strRight', function() {
- equal(_('This_is_a_test_string').strRight('_'), 'is_a_test_string');
- equal(_('This_is_a_test_string').strRight('string'), '');
- equal(_('This_is_a_test_string').strRight(), 'This_is_a_test_string');
- equal(_('This_is_a_test_string').strRight(''), 'This_is_a_test_string');
- equal(_('This_is_a_test_string').strRight('-'), 'This_is_a_test_string');
- equal(_('This_is_a_test_string').strRight(''), 'This_is_a_test_string');
- equal(_('').strRight('foo'), '');
- equal(_(null).strRight('foo'), '');
- equal(_(undefined).strRight('foo'), '');
- equal(_(12345).strRight(2), '345');
- });
-
- test('String: strRightBack', function() {
- equal(_('This_is_a_test_string').strRightBack('_'), 'string');
- equal(_('This_is_a_test_string').strRightBack('string'), '');
- equal(_('This_is_a_test_string').strRightBack(), 'This_is_a_test_string');
- equal(_('This_is_a_test_string').strRightBack(''), 'This_is_a_test_string');
- equal(_('This_is_a_test_string').strRightBack('-'), 'This_is_a_test_string');
- equal(_('').strRightBack('foo'), '');
- equal(_(null).strRightBack('foo'), '');
- equal(_(undefined).strRightBack('foo'), '');
- equal(_(12345).strRightBack(2), '345');
- });
-
- test('String: strLeft', function() {
- equal(_('This_is_a_test_string').strLeft('_'), 'This');
- equal(_('This_is_a_test_string').strLeft('This'), '');
- equal(_('This_is_a_test_string').strLeft(), 'This_is_a_test_string');
- equal(_('This_is_a_test_string').strLeft(''), 'This_is_a_test_string');
- equal(_('This_is_a_test_string').strLeft('-'), 'This_is_a_test_string');
- equal(_('').strLeft('foo'), '');
- equal(_(null).strLeft('foo'), '');
- equal(_(undefined).strLeft('foo'), '');
- equal(_(123454321).strLeft(3), '12');
- });
-
- test('String: strLeftBack', function() {
- equal(_('This_is_a_test_string').strLeftBack('_'), 'This_is_a_test');
- equal(_('This_is_a_test_string').strLeftBack('This'), '');
- equal(_('This_is_a_test_string').strLeftBack(), 'This_is_a_test_string');
- equal(_('This_is_a_test_string').strLeftBack(''), 'This_is_a_test_string');
- equal(_('This_is_a_test_string').strLeftBack('-'), 'This_is_a_test_string');
- equal(_('').strLeftBack('foo'), '');
- equal(_(null).strLeftBack('foo'), '');
- equal(_(undefined).strLeftBack('foo'), '');
- equal(_(123454321).strLeftBack(3), '123454');
- });
-
- test('Strings: stripTags', function() {
- equal(_('a link').stripTags(), 'a link');
- equal(_('a link
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-