Comparing version 3.5.2 to 3.5.3
@@ -104,4 +104,4 @@ #!/usr/bin/env node | ||
isYaml = false; | ||
} catch (error) { | ||
if (error instanceof SyntaxError) { | ||
} catch (err) { | ||
if (err instanceof SyntaxError) { | ||
try { | ||
@@ -112,14 +112,9 @@ output = []; | ||
if (0 === output.length) { | ||
output = null; | ||
} else if (1 === output.length) { | ||
output = output[0]; | ||
} | ||
} catch (error) { | ||
if (options.trace && error.stack) { | ||
console.error(error.stack); | ||
} else { | ||
console.error(error.toString(options.compact)); | ||
} | ||
if (output.length === 0) output = null; | ||
else if (output.length === 1) output = output[0]; | ||
} catch (e) { | ||
if (options.trace && err.stack) console.error(e.stack); | ||
else console.error(e.toString(options.compact)); | ||
process.exit(1); | ||
@@ -129,5 +124,5 @@ } | ||
console.error( | ||
options.trace && error.stack || | ||
error.message || | ||
String(error)); | ||
options.trace && err.stack || | ||
err.message || | ||
String(err)); | ||
@@ -138,9 +133,6 @@ process.exit(1); | ||
if (isYaml) { | ||
console.log(JSON.stringify(output, null, ' ')); | ||
} else { | ||
console.log(yaml.dump(output)); | ||
} | ||
if (isYaml) console.log(JSON.stringify(output, null, ' ')); | ||
else console.log(yaml.dump(output)); | ||
process.exit(0); | ||
}); |
@@ -0,1 +1,7 @@ | ||
3.5.3 / 2016-02-11 | ||
------------------ | ||
- Maintenance release. | ||
3.5.2 / 2016-01-11 | ||
@@ -2,0 +8,0 @@ ------------------ |
@@ -1,3 +0,3 @@ | ||
/* js-yaml 3.5.2 https://github.com/nodeca/js-yaml */ | ||
!function(e){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define([],e);else{var t;t="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this,t.jsyaml=e()}}(function(){return function e(t,n,i){function r(a,s){if(!n[a]){if(!t[a]){var c="function"==typeof require&&require;if(!s&&c)return c(a,!0);if(o)return o(a,!0);var u=new Error("Cannot find module '"+a+"'");throw u.code="MODULE_NOT_FOUND",u}var l=n[a]={exports:{}};t[a][0].call(l.exports,function(e){var n=t[a][1][e];return r(n?n:e)},l,l.exports,e,t,n,i)}return n[a].exports}for(var o="function"==typeof require&&require,a=0;a<i.length;a++)r(i[a]);return r}({1:[function(e,t,n){"use strict";function i(e){return function(){throw new Error("Function "+e+" is deprecated and cannot be used.")}}var r=e("./js-yaml/loader"),o=e("./js-yaml/dumper");t.exports.Type=e("./js-yaml/type"),t.exports.Schema=e("./js-yaml/schema"),t.exports.FAILSAFE_SCHEMA=e("./js-yaml/schema/failsafe"),t.exports.JSON_SCHEMA=e("./js-yaml/schema/json"),t.exports.CORE_SCHEMA=e("./js-yaml/schema/core"),t.exports.DEFAULT_SAFE_SCHEMA=e("./js-yaml/schema/default_safe"),t.exports.DEFAULT_FULL_SCHEMA=e("./js-yaml/schema/default_full"),t.exports.load=r.load,t.exports.loadAll=r.loadAll,t.exports.safeLoad=r.safeLoad,t.exports.safeLoadAll=r.safeLoadAll,t.exports.dump=o.dump,t.exports.safeDump=o.safeDump,t.exports.YAMLException=e("./js-yaml/exception"),t.exports.MINIMAL_SCHEMA=e("./js-yaml/schema/failsafe"),t.exports.SAFE_SCHEMA=e("./js-yaml/schema/default_safe"),t.exports.DEFAULT_SCHEMA=e("./js-yaml/schema/default_full"),t.exports.scan=i("scan"),t.exports.parse=i("parse"),t.exports.compose=i("compose"),t.exports.addConstructor=i("addConstructor")},{"./js-yaml/dumper":3,"./js-yaml/exception":4,"./js-yaml/loader":5,"./js-yaml/schema":7,"./js-yaml/schema/core":8,"./js-yaml/schema/default_full":9,"./js-yaml/schema/default_safe":10,"./js-yaml/schema/failsafe":11,"./js-yaml/schema/json":12,"./js-yaml/type":13}],2:[function(e,t,n){"use strict";function i(e){return"undefined"==typeof e||null===e}function r(e){return"object"==typeof e&&null!==e}function o(e){return Array.isArray(e)?e:i(e)?[]:[e]}function a(e,t){var n,i,r,o;if(t)for(o=Object.keys(t),n=0,i=o.length;i>n;n+=1)r=o[n],e[r]=t[r];return e}function s(e,t){var n,i="";for(n=0;t>n;n+=1)i+=e;return i}function c(e){return 0===e&&Number.NEGATIVE_INFINITY===1/e}t.exports.isNothing=i,t.exports.isObject=r,t.exports.toArray=o,t.exports.repeat=s,t.exports.isNegativeZero=c,t.exports.extend=a},{}],3:[function(e,t,n){"use strict";function i(e,t){var n,i,r,o,a,s,c;if(null===t)return{};for(n={},i=Object.keys(t),r=0,o=i.length;o>r;r+=1)a=i[r],s=String(t[a]),"!!"===a.slice(0,2)&&(a="tag:yaml.org,2002:"+a.slice(2)),c=e.compiledTypeMap[a],c&&F.call(c.styleAliases,s)&&(s=c.styleAliases[s]),n[a]=s;return n}function r(e){var t,n,i;if(t=e.toString(16).toUpperCase(),255>=e)n="x",i=2;else if(65535>=e)n="u",i=4;else{if(!(4294967295>=e))throw new I("code point within a string may not be greater than 0xFFFFFFFF");n="U",i=8}return"\\"+n+j.repeat("0",i-t.length)+t}function o(e){this.schema=e.schema||S,this.indent=Math.max(1,e.indent||2),this.skipInvalid=e.skipInvalid||!1,this.flowLevel=j.isNothing(e.flowLevel)?-1:e.flowLevel,this.styleMap=i(this.schema,e.styles||null),this.sortKeys=e.sortKeys||!1,this.lineWidth=e.lineWidth||80,this.noRefs=e.noRefs||!1,this.implicitTypes=this.schema.compiledImplicit,this.explicitTypes=this.schema.compiledExplicit,this.tag=null,this.result="",this.duplicates=[],this.usedDuplicates=null}function a(e,t){for(var n,i=j.repeat(" ",t),r=0,o=-1,a="",s=e.length;s>r;)o=e.indexOf("\n",r),-1===o?(n=e.slice(r),r=s):(n=e.slice(r,o+1),r=o+1),n.length&&"\n"!==n&&(a+=i),a+=n;return a}function s(e,t){return"\n"+j.repeat(" ",e.indent*t)}function c(e,t){var n,i,r;for(n=0,i=e.implicitTypes.length;i>n;n+=1)if(r=e.implicitTypes[n],r.resolve(t))return!0;return!1}function u(e){this.source=e,this.result="",this.checkpoint=0}function l(e,t,n,i){var r,o,s,l,f,m,g,y,x,v,A,b,w,k,C,j,I,S,E,O,F;if(0===t.length)return void(e.dump="''");if(-1!==te.indexOf(t))return void(e.dump="'"+t+"'");for(r=!0,o=t.length?t.charCodeAt(0):0,s=L===o||L===t.charCodeAt(t.length-1),($===o||W===o||G===o||z===o)&&(r=!1),s||e.flowLevel>-1&&e.flowLevel<=n?(s&&(r=!1),l=!1,f=!1):(l=!i,f=!i),m=!0,g=new u(t),y=!1,x=0,v=0,A=e.indent*n,b=e.lineWidth,-1===b&&(b=9007199254740991),40>A?b-=A:b=40,k=0;k<t.length;k++){if(w=t.charCodeAt(k),r){if(h(w))continue;r=!1}m&&w===R&&(m=!1),C=ee[w],j=d(w),(C||j)&&(w!==T&&w!==D&&w!==R?(l=!1,f=!1):w===T&&(y=!0,m=!1,k>0&&(I=t.charCodeAt(k-1),I===L&&(f=!1,l=!1)),l&&(S=k-x,x=k,S>v&&(v=S))),w!==D&&(m=!1),g.takeUpTo(k),g.escapeChar())}if(r&&c(e,t)&&(r=!1),E="",(l||f)&&(O=0,t.charCodeAt(t.length-1)===T&&(O+=1,t.charCodeAt(t.length-2)===T&&(O+=1)),0===O?E="-":2===O&&(E="+")),(f&&b>v||null!==e.tag)&&(l=!1),y||(f=!1),r)e.dump=t;else if(m)e.dump="'"+t+"'";else if(l)F=p(t,b),e.dump=">"+E+"\n"+a(F,A);else if(f)E||(t=t.replace(/\n$/,"")),e.dump="|"+E+"\n"+a(t,A);else{if(!g)throw new Error("Failed to dump scalar value");g.finish(),e.dump='"'+g.result+'"'}}function p(e,t){var n,i="",r=0,o=e.length,a=/\n+$/.exec(e);for(a&&(o=a.index+1);o>r;)n=e.indexOf("\n",r),n>o||-1===n?(i&&(i+="\n\n"),i+=f(e.slice(r,o),t),r=o):(i&&(i+="\n\n"),i+=f(e.slice(r,n),t),r=n+1);return a&&"\n"!==a[0]&&(i+=a[0]),i}function f(e,t){if(""===e)return e;for(var n,i,r,o=/[^\s] [^\s]/g,a="",s=0,c=0,u=o.exec(e);u;)n=u.index,n-c>t&&(i=s!==c?s:n,a&&(a+="\n"),r=e.slice(c,i),a+=r,c=i+1),s=n+1,u=o.exec(e);return a&&(a+="\n"),a+=c!==s&&e.length-c>t?e.slice(c,s)+"\n"+e.slice(s+1):e.slice(c)}function h(e){return N!==e&&T!==e&&_!==e&&P!==e&&V!==e&&Z!==e&&J!==e&&X!==e&&U!==e&&Y!==e&&B!==e&&M!==e&&Q!==e&&H!==e&&R!==e&&D!==e&&q!==e&&K!==e&&!ee[e]&&!d(e)}function d(e){return!(e>=32&&126>=e||133===e||e>=160&&55295>=e||e>=57344&&65533>=e||e>=65536&&1114111>=e)}function m(e,t,n){var i,r,o="",a=e.tag;for(i=0,r=n.length;r>i;i+=1)A(e,t,n[i],!1,!1)&&(0!==i&&(o+=", "),o+=e.dump);e.tag=a,e.dump="["+o+"]"}function g(e,t,n,i){var r,o,a="",c=e.tag;for(r=0,o=n.length;o>r;r+=1)A(e,t+1,n[r],!0,!0)&&(i&&0===r||(a+=s(e,t)),a+="- "+e.dump);e.tag=c,e.dump=a||"[]"}function y(e,t,n){var i,r,o,a,s,c="",u=e.tag,l=Object.keys(n);for(i=0,r=l.length;r>i;i+=1)s="",0!==i&&(s+=", "),o=l[i],a=n[o],A(e,t,o,!1,!1)&&(e.dump.length>1024&&(s+="? "),s+=e.dump+": ",A(e,t,a,!1,!1)&&(s+=e.dump,c+=s));e.tag=u,e.dump="{"+c+"}"}function x(e,t,n,i){var r,o,a,c,u,l,p="",f=e.tag,h=Object.keys(n);if(e.sortKeys===!0)h.sort();else if("function"==typeof e.sortKeys)h.sort(e.sortKeys);else if(e.sortKeys)throw new I("sortKeys must be a boolean or a function");for(r=0,o=h.length;o>r;r+=1)l="",i&&0===r||(l+=s(e,t)),a=h[r],c=n[a],A(e,t+1,a,!0,!0,!0)&&(u=null!==e.tag&&"?"!==e.tag||e.dump&&e.dump.length>1024,u&&(l+=e.dump&&T===e.dump.charCodeAt(0)?"?":"? "),l+=e.dump,u&&(l+=s(e,t)),A(e,t+1,c,!0,u)&&(l+=e.dump&&T===e.dump.charCodeAt(0)?":":": ",l+=e.dump,p+=l));e.tag=f,e.dump=p||"{}"}function v(e,t,n){var i,r,o,a,s,c;for(r=n?e.explicitTypes:e.implicitTypes,o=0,a=r.length;a>o;o+=1)if(s=r[o],(s.instanceOf||s.predicate)&&(!s.instanceOf||"object"==typeof t&&t instanceof s.instanceOf)&&(!s.predicate||s.predicate(t))){if(e.tag=n?s.tag:"?",s.represent){if(c=e.styleMap[s.tag]||s.defaultStyle,"[object Function]"===O.call(s.represent))i=s.represent(t,c);else{if(!F.call(s.represent,c))throw new I("!<"+s.tag+'> tag resolver accepts not "'+c+'" style');i=s.represent[c](t,c)}e.dump=i}return!0}return!1}function A(e,t,n,i,r,o){e.tag=null,e.dump=n,v(e,n,!1)||v(e,n,!0);var a=O.call(e.dump);i&&(i=0>e.flowLevel||e.flowLevel>t);var s,c,u="[object Object]"===a||"[object Array]"===a;if(u&&(s=e.duplicates.indexOf(n),c=-1!==s),(null!==e.tag&&"?"!==e.tag||c||2!==e.indent&&t>0)&&(r=!1),c&&e.usedDuplicates[s])e.dump="*ref_"+s;else{if(u&&c&&!e.usedDuplicates[s]&&(e.usedDuplicates[s]=!0),"[object Object]"===a)i&&0!==Object.keys(e.dump).length?(x(e,t,e.dump,r),c&&(e.dump="&ref_"+s+e.dump)):(y(e,t,e.dump),c&&(e.dump="&ref_"+s+" "+e.dump));else if("[object Array]"===a)i&&0!==e.dump.length?(g(e,t,e.dump,r),c&&(e.dump="&ref_"+s+e.dump)):(m(e,t,e.dump),c&&(e.dump="&ref_"+s+" "+e.dump));else{if("[object String]"!==a){if(e.skipInvalid)return!1;throw new I("unacceptable kind of an object to dump "+a)}"?"!==e.tag&&l(e,e.dump,t,o)}null!==e.tag&&"?"!==e.tag&&(e.dump="!<"+e.tag+"> "+e.dump)}return!0}function b(e,t){var n,i,r=[],o=[];for(w(e,r,o),n=0,i=o.length;i>n;n+=1)t.duplicates.push(r[o[n]]);t.usedDuplicates=new Array(i)}function w(e,t,n){var i,r,o;if(null!==e&&"object"==typeof e)if(r=t.indexOf(e),-1!==r)-1===n.indexOf(r)&&n.push(r);else if(t.push(e),Array.isArray(e))for(r=0,o=e.length;o>r;r+=1)w(e[r],t,n);else for(i=Object.keys(e),r=0,o=i.length;o>r;r+=1)w(e[i[r]],t,n)}function k(e,t){t=t||{};var n=new o(t);return n.noRefs||b(e,n),A(n,0,e,!0,!0)?n.dump+"\n":""}function C(e,t){return k(e,j.extend({schema:E},t))}var j=e("./common"),I=e("./exception"),S=e("./schema/default_full"),E=e("./schema/default_safe"),O=Object.prototype.toString,F=Object.prototype.hasOwnProperty,N=9,T=10,_=13,L=32,M=33,D=34,U=35,q=37,Y=38,R=39,B=42,P=44,$=45,K=58,H=62,W=63,G=64,V=91,Z=93,z=96,J=123,Q=124,X=125,ee={};ee[0]="\\0",ee[7]="\\a",ee[8]="\\b",ee[9]="\\t",ee[10]="\\n",ee[11]="\\v",ee[12]="\\f",ee[13]="\\r",ee[27]="\\e",ee[34]='\\"',ee[92]="\\\\",ee[133]="\\N",ee[160]="\\_",ee[8232]="\\L",ee[8233]="\\P";var te=["y","Y","yes","Yes","YES","on","On","ON","n","N","no","No","NO","off","Off","OFF"];u.prototype.takeUpTo=function(e){var t;if(e<this.checkpoint)throw t=new Error("position should be > checkpoint"),t.position=e,t.checkpoint=this.checkpoint,t;return this.result+=this.source.slice(this.checkpoint,e),this.checkpoint=e,this},u.prototype.escapeChar=function(){var e,t;return e=this.source.charCodeAt(this.checkpoint),t=ee[e]||r(e),this.result+=t,this.checkpoint+=1,this},u.prototype.finish=function(){this.source.length>this.checkpoint&&this.takeUpTo(this.source.length)},t.exports.dump=k,t.exports.safeDump=C},{"./common":2,"./exception":4,"./schema/default_full":9,"./schema/default_safe":10}],4:[function(e,t,n){"use strict";function i(e,t){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=(new Error).stack||"",this.name="YAMLException",this.reason=e,this.mark=t,this.message=(this.reason||"(unknown reason)")+(this.mark?" "+this.mark.toString():"")}i.prototype=Object.create(Error.prototype),i.prototype.constructor=i,i.prototype.toString=function(e){var t=this.name+": ";return t+=this.reason||"(unknown reason)",!e&&this.mark&&(t+=" "+this.mark.toString()),t},t.exports=i},{}],5:[function(e,t,n){"use strict";function i(e){return 10===e||13===e}function r(e){return 9===e||32===e}function o(e){return 9===e||32===e||10===e||13===e}function a(e){return 44===e||91===e||93===e||123===e||125===e}function s(e){var t;return e>=48&&57>=e?e-48:(t=32|e,t>=97&&102>=t?t-97+10:-1)}function c(e){return 120===e?2:117===e?4:85===e?8:0}function u(e){return e>=48&&57>=e?e-48:-1}function l(e){return 48===e?"\x00":97===e?"":98===e?"\b":116===e?" ":9===e?" ":110===e?"\n":118===e?"\x0B":102===e?"\f":114===e?"\r":101===e?"":32===e?" ":34===e?'"':47===e?"/":92===e?"\\":78===e?" ":95===e?" ":76===e?"\u2028":80===e?"\u2029":""}function p(e){return 65535>=e?String.fromCharCode(e):String.fromCharCode((e-65536>>10)+55296,(e-65536&1023)+56320)}function f(e,t){this.input=e,this.filename=t.filename||null,this.schema=t.schema||K,this.onWarning=t.onWarning||null,this.legacy=t.legacy||!1,this.json=t.json||!1,this.implicitTypes=this.schema.compiledImplicit,this.typeMap=this.schema.compiledTypeMap,this.length=e.length,this.position=0,this.line=0,this.lineStart=0,this.lineIndent=0,this.documents=[]}function h(e,t){return new B(t,new P(e.filename,e.input,e.position,e.line,e.position-e.lineStart))}function d(e,t){throw h(e,t)}function m(e,t){e.onWarning&&e.onWarning.call(null,h(e,t))}function g(e,t,n,i){var r,o,a,s;if(n>t){if(s=e.input.slice(t,n),i)for(r=0,o=s.length;o>r;r+=1)a=s.charCodeAt(r),9===a||a>=32&&1114111>=a||d(e,"expected valid JSON character");else X.test(s)&&d(e,"the stream contains non-printable characters");e.result+=s}}function y(e,t,n,i){var r,o,a,s;for(R.isObject(n)||d(e,"cannot merge mappings; the provided source object is unacceptable"),r=Object.keys(n),a=0,s=r.length;s>a;a+=1)o=r[a],H.call(t,o)||(t[o]=n[o],i[o]=!0)}function x(e,t,n,i,r,o){var a,s;if(r=String(r),null===t&&(t={}),"tag:yaml.org,2002:merge"===i)if(Array.isArray(o))for(a=0,s=o.length;s>a;a+=1)y(e,t,o[a],n);else y(e,t,o,n);else e.json||H.call(n,r)||!H.call(t,r)||d(e,"duplicated mapping key"),t[r]=o,delete n[r];return t}function v(e){var t;t=e.input.charCodeAt(e.position),10===t?e.position++:13===t?(e.position++,10===e.input.charCodeAt(e.position)&&e.position++):d(e,"a line break is expected"),e.line+=1,e.lineStart=e.position}function A(e,t,n){for(var o=0,a=e.input.charCodeAt(e.position);0!==a;){for(;r(a);)a=e.input.charCodeAt(++e.position);if(t&&35===a)do a=e.input.charCodeAt(++e.position);while(10!==a&&13!==a&&0!==a);if(!i(a))break;for(v(e),a=e.input.charCodeAt(e.position),o++,e.lineIndent=0;32===a;)e.lineIndent++,a=e.input.charCodeAt(++e.position)}return-1!==n&&0!==o&&e.lineIndent<n&&m(e,"deficient indentation"),o}function b(e){var t,n=e.position;return t=e.input.charCodeAt(n),45!==t&&46!==t||e.input.charCodeAt(n+1)!==t||e.input.charCodeAt(n+2)!==t||(n+=3,t=e.input.charCodeAt(n),0!==t&&!o(t))?!1:!0}function w(e,t){1===t?e.result+=" ":t>1&&(e.result+=R.repeat("\n",t-1))}function k(e,t,n){var s,c,u,l,p,f,h,d,m,y=e.kind,x=e.result;if(m=e.input.charCodeAt(e.position),o(m)||a(m)||35===m||38===m||42===m||33===m||124===m||62===m||39===m||34===m||37===m||64===m||96===m)return!1;if((63===m||45===m)&&(c=e.input.charCodeAt(e.position+1),o(c)||n&&a(c)))return!1;for(e.kind="scalar",e.result="",u=l=e.position,p=!1;0!==m;){if(58===m){if(c=e.input.charCodeAt(e.position+1),o(c)||n&&a(c))break}else if(35===m){if(s=e.input.charCodeAt(e.position-1),o(s))break}else{if(e.position===e.lineStart&&b(e)||n&&a(m))break;if(i(m)){if(f=e.line,h=e.lineStart,d=e.lineIndent,A(e,!1,-1),e.lineIndent>=t){p=!0,m=e.input.charCodeAt(e.position);continue}e.position=l,e.line=f,e.lineStart=h,e.lineIndent=d;break}}p&&(g(e,u,l,!1),w(e,e.line-f),u=l=e.position,p=!1),r(m)||(l=e.position+1),m=e.input.charCodeAt(++e.position)}return g(e,u,l,!1),e.result?!0:(e.kind=y,e.result=x,!1)}function C(e,t){var n,r,o;if(n=e.input.charCodeAt(e.position),39!==n)return!1;for(e.kind="scalar",e.result="",e.position++,r=o=e.position;0!==(n=e.input.charCodeAt(e.position));)if(39===n){if(g(e,r,e.position,!0),n=e.input.charCodeAt(++e.position),39!==n)return!0;r=o=e.position,e.position++}else i(n)?(g(e,r,o,!0),w(e,A(e,!1,t)),r=o=e.position):e.position===e.lineStart&&b(e)?d(e,"unexpected end of the document within a single quoted scalar"):(e.position++,o=e.position);d(e,"unexpected end of the stream within a single quoted scalar")}function j(e,t){var n,r,o,a,u,l;if(l=e.input.charCodeAt(e.position),34!==l)return!1;for(e.kind="scalar",e.result="",e.position++,n=r=e.position;0!==(l=e.input.charCodeAt(e.position));){if(34===l)return g(e,n,e.position,!0),e.position++,!0;if(92===l){if(g(e,n,e.position,!0),l=e.input.charCodeAt(++e.position),i(l))A(e,!1,t);else if(256>l&&re[l])e.result+=oe[l],e.position++;else if((u=c(l))>0){for(o=u,a=0;o>0;o--)l=e.input.charCodeAt(++e.position),(u=s(l))>=0?a=(a<<4)+u:d(e,"expected hexadecimal character");e.result+=p(a),e.position++}else d(e,"unknown escape sequence");n=r=e.position}else i(l)?(g(e,n,r,!0),w(e,A(e,!1,t)),n=r=e.position):e.position===e.lineStart&&b(e)?d(e,"unexpected end of the document within a double quoted scalar"):(e.position++,r=e.position)}d(e,"unexpected end of the stream within a double quoted scalar")}function I(e,t){var n,i,r,a,s,c,u,l,p,f,h,m=!0,g=e.tag,y=e.anchor,v={};if(h=e.input.charCodeAt(e.position),91===h)a=93,u=!1,i=[];else{if(123!==h)return!1;a=125,u=!0,i={}}for(null!==e.anchor&&(e.anchorMap[e.anchor]=i),h=e.input.charCodeAt(++e.position);0!==h;){if(A(e,!0,t),h=e.input.charCodeAt(e.position),h===a)return e.position++,e.tag=g,e.anchor=y,e.kind=u?"mapping":"sequence",e.result=i,!0;m||d(e,"missed comma between flow collection entries"),p=l=f=null,s=c=!1,63===h&&(r=e.input.charCodeAt(e.position+1),o(r)&&(s=c=!0,e.position++,A(e,!0,t))),n=e.line,_(e,t,W,!1,!0),p=e.tag,l=e.result,A(e,!0,t),h=e.input.charCodeAt(e.position),!c&&e.line!==n||58!==h||(s=!0,h=e.input.charCodeAt(++e.position),A(e,!0,t),_(e,t,W,!1,!0),f=e.result),u?x(e,i,v,p,l,f):s?i.push(x(e,null,v,p,l,f)):i.push(l),A(e,!0,t),h=e.input.charCodeAt(e.position),44===h?(m=!0,h=e.input.charCodeAt(++e.position)):m=!1}d(e,"unexpected end of the stream within a flow collection")}function S(e,t){var n,o,a,s,c=z,l=!1,p=t,f=0,h=!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?Q:J:d(e,"repeat of a chomping mode identifier");else{if(!((a=u(s))>=0))break;0===a?d(e,"bad explicit indentation width of a block scalar; it cannot be less than one"):l?d(e,"repeat of an indentation width identifier"):(p=t+a-1,l=!0)}if(r(s)){do s=e.input.charCodeAt(++e.position);while(r(s));if(35===s)do s=e.input.charCodeAt(++e.position);while(!i(s)&&0!==s)}for(;0!==s;){for(v(e),e.lineIndent=0,s=e.input.charCodeAt(e.position);(!l||e.lineIndent<p)&&32===s;)e.lineIndent++,s=e.input.charCodeAt(++e.position);if(!l&&e.lineIndent>p&&(p=e.lineIndent),i(s))f++;else{if(e.lineIndent<p){c===Q?e.result+=R.repeat("\n",f):c===z&&l&&(e.result+="\n");break}for(o?r(s)?(h=!0,e.result+=R.repeat("\n",f+1)):h?(h=!1,e.result+=R.repeat("\n",f+1)):0===f?l&&(e.result+=" "):e.result+=R.repeat("\n",f):l?e.result+=R.repeat("\n",f+1):e.result+=R.repeat("\n",f),l=!0,f=0,n=e.position;!i(s)&&0!==s;)s=e.input.charCodeAt(++e.position);g(e,n,e.position,!1)}}return!0}function E(e,t){var n,i,r,a=e.tag,s=e.anchor,c=[],u=!1;for(null!==e.anchor&&(e.anchorMap[e.anchor]=c),r=e.input.charCodeAt(e.position);0!==r&&45===r&&(i=e.input.charCodeAt(e.position+1),o(i));)if(u=!0,e.position++,A(e,!0,-1)&&e.lineIndent<=t)c.push(null),r=e.input.charCodeAt(e.position);else if(n=e.line,_(e,t,V,!1,!0),c.push(e.result),A(e,!0,-1),r=e.input.charCodeAt(e.position),(e.line===n||e.lineIndent>t)&&0!==r)d(e,"bad indentation of a sequence entry");else if(e.lineIndent<t)break;return u?(e.tag=a,e.anchor=s,e.kind="sequence",e.result=c,!0):!1}function O(e,t,n){var i,a,s,c,u=e.tag,l=e.anchor,p={},f={},h=null,m=null,g=null,y=!1,v=!1;for(null!==e.anchor&&(e.anchorMap[e.anchor]=p),c=e.input.charCodeAt(e.position);0!==c;){if(i=e.input.charCodeAt(e.position+1),s=e.line,63!==c&&58!==c||!o(i)){if(!_(e,n,G,!1,!0))break;if(e.line===s){for(c=e.input.charCodeAt(e.position);r(c);)c=e.input.charCodeAt(++e.position);if(58===c)c=e.input.charCodeAt(++e.position),o(c)||d(e,"a whitespace character is expected after the key-value separator within a block mapping"),y&&(x(e,p,f,h,m,null),h=m=g=null),v=!0,y=!1,a=!1,h=e.tag,m=e.result;else{if(!v)return e.tag=u,e.anchor=l,!0;d(e,"can not read an implicit mapping pair; a colon is missed")}}else{if(!v)return e.tag=u,e.anchor=l,!0;d(e,"can not read a block mapping entry; a multiline key may not be an implicit key")}}else 63===c?(y&&(x(e,p,f,h,m,null),h=m=g=null),v=!0,y=!0,a=!0):y?(y=!1,a=!0):d(e,"incomplete explicit mapping pair; a key node is missed"),e.position+=1,c=i;if((e.line===s||e.lineIndent>t)&&(_(e,t,Z,!0,a)&&(y?m=e.result:g=e.result),y||(x(e,p,f,h,m,g),h=m=g=null),A(e,!0,-1),c=e.input.charCodeAt(e.position)),e.lineIndent>t&&0!==c)d(e,"bad indentation of a mapping entry");else if(e.lineIndent<t)break}return y&&x(e,p,f,h,m,null),v&&(e.tag=u,e.anchor=l,e.kind="mapping",e.result=p),v}function F(e){var t,n,i,r,a=!1,s=!1;if(r=e.input.charCodeAt(e.position),33!==r)return!1;if(null!==e.tag&&d(e,"duplication of a tag property"),r=e.input.charCodeAt(++e.position),60===r?(a=!0,r=e.input.charCodeAt(++e.position)):33===r?(s=!0,n="!!",r=e.input.charCodeAt(++e.position)):n="!",t=e.position,a){do r=e.input.charCodeAt(++e.position);while(0!==r&&62!==r);e.position<e.length?(i=e.input.slice(t,e.position),r=e.input.charCodeAt(++e.position)):d(e,"unexpected end of the stream within a verbatim tag")}else{for(;0!==r&&!o(r);)33===r&&(s?d(e,"tag suffix cannot contain exclamation marks"):(n=e.input.slice(t-1,e.position+1),ne.test(n)||d(e,"named tag handle cannot contain such characters"),s=!0,t=e.position+1)),r=e.input.charCodeAt(++e.position);i=e.input.slice(t,e.position),te.test(i)&&d(e,"tag suffix cannot contain flow indicator characters")}return i&&!ie.test(i)&&d(e,"tag name cannot contain such characters: "+i),a?e.tag=i:H.call(e.tagMap,n)?e.tag=e.tagMap[n]+i:"!"===n?e.tag="!"+i:"!!"===n?e.tag="tag:yaml.org,2002:"+i:d(e,'undeclared tag handle "'+n+'"'),!0}function N(e){var t,n;if(n=e.input.charCodeAt(e.position),38!==n)return!1;for(null!==e.anchor&&d(e,"duplication of an anchor property"),n=e.input.charCodeAt(++e.position),t=e.position;0!==n&&!o(n)&&!a(n);)n=e.input.charCodeAt(++e.position);return e.position===t&&d(e,"name of an anchor node must contain at least one character"),e.anchor=e.input.slice(t,e.position),!0}function T(e){var t,n,i;if(i=e.input.charCodeAt(e.position),42!==i)return!1;for(i=e.input.charCodeAt(++e.position),t=e.position;0!==i&&!o(i)&&!a(i);)i=e.input.charCodeAt(++e.position);return e.position===t&&d(e,"name of an alias node must contain at least one character"),n=e.input.slice(t,e.position),e.anchorMap.hasOwnProperty(n)||d(e,'unidentified alias "'+n+'"'),e.result=e.anchorMap[n],A(e,!0,-1),!0}function _(e,t,n,i,r){var o,a,s,c,u,l,p,f,h=1,m=!1,g=!1;if(e.tag=null,e.anchor=null,e.kind=null,e.result=null,o=a=s=Z===n||V===n,i&&A(e,!0,-1)&&(m=!0,e.lineIndent>t?h=1:e.lineIndent===t?h=0:e.lineIndent<t&&(h=-1)),1===h)for(;F(e)||N(e);)A(e,!0,-1)?(m=!0,s=o,e.lineIndent>t?h=1:e.lineIndent===t?h=0:e.lineIndent<t&&(h=-1)):s=!1;if(s&&(s=m||r),(1===h||Z===n)&&(p=W===n||G===n?t:t+1,f=e.position-e.lineStart,1===h?s&&(E(e,f)||O(e,f,p))||I(e,p)?g=!0:(a&&S(e,p)||C(e,p)||j(e,p)?g=!0:T(e)?(g=!0,(null!==e.tag||null!==e.anchor)&&d(e,"alias node should not have any properties")):k(e,p,W===n)&&(g=!0,null===e.tag&&(e.tag="?")),null!==e.anchor&&(e.anchorMap[e.anchor]=e.result)):0===h&&(g=s&&E(e,f))),null!==e.tag&&"!"!==e.tag)if("?"===e.tag){for(c=0,u=e.implicitTypes.length;u>c;c+=1)if(l=e.implicitTypes[c],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 H.call(e.typeMap,e.tag)?(l=e.typeMap[e.tag],null!==e.result&&l.kind!==e.kind&&d(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)):d(e,"cannot resolve a node with !<"+e.tag+"> explicit tag")):d(e,"unknown tag !<"+e.tag+">");return null!==e.tag||null!==e.anchor||g}function L(e){var t,n,a,s,c=e.position,u=!1;for(e.version=null,e.checkLineBreaks=e.legacy,e.tagMap={},e.anchorMap={};0!==(s=e.input.charCodeAt(e.position))&&(A(e,!0,-1),s=e.input.charCodeAt(e.position),!(e.lineIndent>0||37!==s));){for(u=!0,s=e.input.charCodeAt(++e.position),t=e.position;0!==s&&!o(s);)s=e.input.charCodeAt(++e.position);for(n=e.input.slice(t,e.position),a=[],n.length<1&&d(e,"directive name must not be less than one character in length");0!==s;){for(;r(s);)s=e.input.charCodeAt(++e.position);if(35===s){do s=e.input.charCodeAt(++e.position);while(0!==s&&!i(s));break}if(i(s))break;for(t=e.position;0!==s&&!o(s);)s=e.input.charCodeAt(++e.position);a.push(e.input.slice(t,e.position))}0!==s&&v(e),H.call(se,n)?se[n](e,n,a):m(e,'unknown document directive "'+n+'"')}return A(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,A(e,!0,-1)):u&&d(e,"directives end mark is expected"),_(e,e.lineIndent-1,Z,!1,!0),A(e,!0,-1),e.checkLineBreaks&&ee.test(e.input.slice(c,e.position))&&m(e,"non-ASCII line breaks are interpreted as content"),e.documents.push(e.result),e.position===e.lineStart&&b(e)?void(46===e.input.charCodeAt(e.position)&&(e.position+=3,A(e,!0,-1))):void(e.position<e.length-1&&d(e,"end of the stream or a document separator is expected"))}function M(e,t){e=String(e),t=t||{},0!==e.length&&(10!==e.charCodeAt(e.length-1)&&13!==e.charCodeAt(e.length-1)&&(e+="\n"),65279===e.charCodeAt(0)&&(e=e.slice(1)));var n=new f(e,t);for(n.input+="\x00";32===n.input.charCodeAt(n.position);)n.lineIndent+=1,n.position+=1;for(;n.position<n.length-1;)L(n);return n.documents}function D(e,t,n){var i,r,o=M(e,n);for(i=0,r=o.length;r>i;i+=1)t(o[i])}function U(e,t){var n=M(e,t);if(0!==n.length){if(1===n.length)return n[0];throw new B("expected a single document in the stream, but found more")}}function q(e,t,n){D(e,t,R.extend({schema:$},n))}function Y(e,t){return U(e,R.extend({schema:$},t))}for(var R=e("./common"),B=e("./exception"),P=e("./mark"),$=e("./schema/default_safe"),K=e("./schema/default_full"),H=Object.prototype.hasOwnProperty,W=1,G=2,V=3,Z=4,z=1,J=2,Q=3,X=/[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,ee=/[\x85\u2028\u2029]/,te=/[,\[\]\{\}]/,ne=/^(?:!|!!|![a-z\-]+!)$/i,ie=/^(?:!|[^,\[\]\{\}])(?:%[0-9a-f]{2}|[0-9a-z\-#;\/\?:@&=\+\$,_\.!~\*'\(\)\[\]])*$/i,re=new Array(256),oe=new Array(256),ae=0;256>ae;ae++)re[ae]=l(ae)?1:0,oe[ae]=l(ae);var se={YAML:function(e,t,n){var i,r,o;null!==e.version&&d(e,"duplication of %YAML directive"),1!==n.length&&d(e,"YAML directive accepts exactly one argument"),i=/^([0-9]+)\.([0-9]+)$/.exec(n[0]),null===i&&d(e,"ill-formed argument of the YAML directive"),r=parseInt(i[1],10),o=parseInt(i[2],10),1!==r&&d(e,"unacceptable YAML version of the document"),e.version=n[0],e.checkLineBreaks=2>o,1!==o&&2!==o&&m(e,"unsupported YAML version of the document")},TAG:function(e,t,n){var i,r;2!==n.length&&d(e,"TAG directive accepts exactly two arguments"),i=n[0],r=n[1],ne.test(i)||d(e,"ill-formed tag handle (first argument) of the TAG directive"),H.call(e.tagMap,i)&&d(e,'there is a previously declared suffix for "'+i+'" tag handle'),ie.test(r)||d(e,"ill-formed tag prefix (second argument) of the TAG directive"),e.tagMap[i]=r}};t.exports.loadAll=D,t.exports.load=U,t.exports.safeLoadAll=q,t.exports.safeLoad=Y},{"./common":2,"./exception":4,"./mark":6,"./schema/default_full":9,"./schema/default_safe":10}],6:[function(e,t,n){"use strict";function i(e,t,n,i,r){this.name=e,this.buffer=t,this.position=n,this.line=i,this.column=r}var r=e("./common");i.prototype.getSnippet=function(e,t){var n,i,o,a,s;if(!this.buffer)return null;for(e=e||4,t=t||75,n="",i=this.position;i>0&&-1==="\x00\r\n \u2028\u2029".indexOf(this.buffer.charAt(i-1));)if(i-=1,this.position-i>t/2-1){n=" ... ",i+=5;break}for(o="",a=this.position;a<this.buffer.length&&-1==="\x00\r\n \u2028\u2029".indexOf(this.buffer.charAt(a));)if(a+=1,a-this.position>t/2-1){o=" ... ",a-=5;break}return s=this.buffer.slice(i,a),r.repeat(" ",e)+n+s+o+"\n"+r.repeat(" ",e+this.position-i+n.length)+"^"},i.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=i},{"./common":2}],7:[function(e,t,n){"use strict";function i(e,t,n){var r=[];return e.include.forEach(function(e){n=i(e,t,n)}),e[t].forEach(function(e){n.forEach(function(t,n){t.tag===e.tag&&r.push(n)}),n.push(e)}),n.filter(function(e,t){return-1===r.indexOf(t)})}function r(){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 o(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 s("There is a non-scalar type in the implicit list of a schema. Implicit resolving of such types is not supported.")}),this.compiledImplicit=i(this,"implicit",[]),this.compiledExplicit=i(this,"explicit",[]),this.compiledTypeMap=r(this.compiledImplicit,this.compiledExplicit)}var a=e("./common"),s=e("./exception"),c=e("./type");o.DEFAULT=null,o.create=function(){var e,t;switch(arguments.length){case 1:e=o.DEFAULT,t=arguments[0];break;case 2:e=arguments[0],t=arguments[1];break;default:throw new s("Wrong number of arguments for Schema.create function")}if(e=a.toArray(e),t=a.toArray(t),!e.every(function(e){return e instanceof o}))throw new s("Specified list of super schemas (or a single Schema object) contains a non-Schema object.");if(!t.every(function(e){return e instanceof c}))throw new s("Specified list of YAML types (or a single Type object) contains a non-Type object.");return new o({include:e,explicit:t})},t.exports=o},{"./common":2,"./exception":4,"./type":13}],8:[function(e,t,n){"use strict";var i=e("../schema");t.exports=new i({include:[e("./json")]})},{"../schema":7,"./json":12}],9:[function(e,t,n){"use strict";var i=e("../schema");t.exports=i.DEFAULT=new i({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,n){"use strict";var i=e("../schema");t.exports=new i({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,n){"use strict";var i=e("../schema");t.exports=new i({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,n){"use strict";var i=e("../schema");t.exports=new i({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,n){"use strict";function i(e){var t={};return null!==e&&Object.keys(e).forEach(function(n){e[n].forEach(function(e){t[String(e)]=n})}),t}function r(e,t){if(t=t||{},Object.keys(t).forEach(function(t){if(-1===a.indexOf(t))throw new o('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=i(t.styleAliases||null),-1===s.indexOf(this.kind))throw new o('Unknown kind "'+this.kind+'" is specified for "'+e+'" YAML type.')}var o=e("./exception"),a=["kind","resolve","construct","instanceOf","predicate","represent","defaultStyle","styleAliases"],s=["scalar","sequence","mapping"];t.exports=r},{"./exception":4}],14:[function(e,t,n){"use strict";function i(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 r(e){var t,n,i=e.replace(/[\r\n=]/g,""),r=i.length,o=u,a=0,c=[];for(t=0;r>t;t++)t%4===0&&t&&(c.push(a>>16&255),c.push(a>>8&255),c.push(255&a)),a=a<<6|o.indexOf(i.charAt(t));return n=r%4*6,0===n?(c.push(a>>16&255),c.push(a>>8&255),c.push(255&a)):18===n?(c.push(a>>10&255),c.push(a>>2&255)):12===n&&c.push(a>>4&255),s?new s(c):c}function o(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 a(e){return s&&s.isBuffer(e)}var s=e("buffer").Buffer,c=e("../type"),u="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=\n\r";t.exports=new c("tag:yaml.org,2002:binary",{kind:"scalar",resolve:i,construct:r,predicate:a,represent:o})},{"../type":13,buffer:30}],15:[function(e,t,n){"use strict";function i(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 r(e){return"true"===e||"True"===e||"TRUE"===e}function o(e){return"[object Boolean]"===Object.prototype.toString.call(e)}var a=e("../type");t.exports=new a("tag:yaml.org,2002:bool",{kind:"scalar",resolve:i,construct:r,predicate:o,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,n){"use strict";function i(e){return null===e?!1:u.test(e)?!0:!1}function r(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?NaN: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 o(e,t){var n;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)switch(t){case"lowercase":return"-.inf";case"uppercase":return"-.INF";case"camelcase":return"-.Inf"}else if(s.isNegativeZero(e))return"-0.0";return n=e.toString(10),l.test(n)?n.replace("e",".e"):n}function a(e){return"[object Number]"===Object.prototype.toString.call(e)&&(0!==e%1||s.isNegativeZero(e))}var s=e("../common"),c=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))$"),l=/^[-+]?[0-9]+e/;t.exports=new c("tag:yaml.org,2002:float",{kind:"scalar",resolve:i,construct:r,predicate:a,represent:o,defaultStyle:"lowercase"})},{"../common":2,"../type":13}],17:[function(e,t,n){"use strict";function i(e){return e>=48&&57>=e||e>=65&&70>=e||e>=97&&102>=e}function r(e){return e>=48&&55>=e}function o(e){return e>=48&&57>=e}function a(e){if(null===e)return!1;var t,n=e.length,a=0,s=!1;if(!n)return!1;if(t=e[a],("-"===t||"+"===t)&&(t=e[++a]),"0"===t){if(a+1===n)return!0;if(t=e[++a],"b"===t){for(a++;n>a;a++)if(t=e[a],"_"!==t){if("0"!==t&&"1"!==t)return!1;s=!0}return s}if("x"===t){for(a++;n>a;a++)if(t=e[a],"_"!==t){if(!i(e.charCodeAt(a)))return!1;s=!0}return s}for(;n>a;a++)if(t=e[a],"_"!==t){if(!r(e.charCodeAt(a)))return!1;s=!0}return s}for(;n>a;a++)if(t=e[a],"_"!==t){if(":"===t)break;if(!o(e.charCodeAt(a)))return!1;s=!0}return s?":"!==t?!0:/^(:[0-5]?[0-9])+$/.test(e.slice(a)):!1}function s(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 c(e){return"[object Number]"===Object.prototype.toString.call(e)&&0===e%1&&!u.isNegativeZero(e)}var u=e("../common"),l=e("../type");t.exports=new l("tag:yaml.org,2002:int",{kind:"scalar",resolve:a,construct:s,predicate:c,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,n){"use strict";function i(e){if(null===e)return!1;try{var t="("+e+")",n=s.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 r(e){var t,n="("+e+")",i=s.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 o(e){return e.toString()}function a(e){return"[object Function]"===Object.prototype.toString.call(e)}var s;try{var c=e;s=c("esprima")}catch(u){"undefined"!=typeof window&&(s=window.esprima)}var l=e("../../type");t.exports=new l("tag:yaml.org,2002:js/function",{kind:"scalar",resolve:i,construct:r,predicate:a,represent:o})},{"../../type":13}],19:[function(e,t,n){"use strict";function i(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{return!0}catch(r){return!1}}function r(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 o(e){var t="/"+e.source+"/";return e.global&&(t+="g"),e.multiline&&(t+="m"),e.ignoreCase&&(t+="i"),t}function a(e){return"[object RegExp]"===Object.prototype.toString.call(e)}var s=e("../../type");t.exports=new s("tag:yaml.org,2002:js/regexp",{kind:"scalar",resolve:i,construct:r,predicate:a,represent:o})},{"../../type":13}],20:[function(e,t,n){"use strict";function i(){return!0}function r(){}function o(){return""}function a(e){return"undefined"==typeof e}var s=e("../../type");t.exports=new s("tag:yaml.org,2002:js/undefined",{kind:"scalar",resolve:i,construct:r,predicate:a,represent:o})},{"../../type":13}],21:[function(e,t,n){"use strict";var i=e("../type");t.exports=new i("tag:yaml.org,2002:map",{kind:"mapping",construct:function(e){return null!==e?e:{}}})},{"../type":13}],22:[function(e,t,n){"use strict";function i(e){return"<<"===e||null===e}var r=e("../type");t.exports=new r("tag:yaml.org,2002:merge",{kind:"scalar",resolve:i})},{"../type":13}],23:[function(e,t,n){"use strict";function i(e){if(null===e)return!0;var t=e.length;return 1===t&&"~"===e||4===t&&("null"===e||"Null"===e||"NULL"===e)}function r(){return null}function o(e){return null===e}var a=e("../type");t.exports=new a("tag:yaml.org,2002:null",{kind:"scalar",resolve:i,construct:r,predicate:o,represent:{canonical:function(){return"~"},lowercase:function(){return"null"},uppercase:function(){return"NULL"},camelcase:function(){return"Null"}},defaultStyle:"lowercase"})},{"../type":13}],24:[function(e,t,n){"use strict";function i(e){if(null===e)return!0;var t,n,i,r,o,c=[],u=e;for(t=0,n=u.length;n>t;t+=1){if(i=u[t],o=!1,"[object Object]"!==s.call(i))return!1;for(r in i)if(a.call(i,r)){if(o)return!1;o=!0}if(!o)return!1;if(-1!==c.indexOf(r))return!1;c.push(r)}return!0}function r(e){return null!==e?e:[]}var o=e("../type"),a=Object.prototype.hasOwnProperty,s=Object.prototype.toString;t.exports=new o("tag:yaml.org,2002:omap",{kind:"sequence",resolve:i,construct:r})},{"../type":13}],25:[function(e,t,n){"use strict";function i(e){if(null===e)return!0;var t,n,i,r,o,s=e;for(o=new Array(s.length),t=0,n=s.length;n>t;t+=1){if(i=s[t],"[object Object]"!==a.call(i))return!1;if(r=Object.keys(i),1!==r.length)return!1;o[t]=[r[0],i[r[0]]]}return!0}function r(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 o=e("../type"),a=Object.prototype.toString;t.exports=new o("tag:yaml.org,2002:pairs",{kind:"sequence",resolve:i,construct:r})},{"../type":13}],26:[function(e,t,n){"use strict";var i=e("../type");t.exports=new i("tag:yaml.org,2002:seq",{kind:"sequence",construct:function(e){return null!==e?e:[]}})},{"../type":13}],27:[function(e,t,n){"use strict";function i(e){if(null===e)return!0;var t,n=e;for(t in n)if(a.call(n,t)&&null!==n[t])return!1;return!0}function r(e){return null!==e?e:{}}var o=e("../type"),a=Object.prototype.hasOwnProperty;t.exports=new o("tag:yaml.org,2002:set",{kind:"mapping",resolve:i,construct:r})},{"../type":13}],28:[function(e,t,n){"use strict";var i=e("../type");t.exports=new i("tag:yaml.org,2002:str",{kind:"scalar",construct:function(e){return null!==e?e:""}})},{"../type":13}],29:[function(e,t,n){"use strict";function i(e){return null===e?!1:null===s.exec(e)?!1:!0}function r(e){var t,n,i,r,o,a,c,u,l,p,f=0,h=null;if(t=s.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],a=+t[5],c=+t[6],t[7]){for(f=t[7].slice(0,3);f.length<3;)f+="0";f=+f}return t[9]&&(u=+t[10],l=+(t[11]||0),h=6e4*(60*u+l),"-"===t[9]&&(h=-h)),p=new Date(Date.UTC(n,i,r,o,a,c,f)),h&&p.setTime(p.getTime()-h),p}function o(e){return e.toISOString()}var a=e("../type"),s=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 a("tag:yaml.org,2002:timestamp",{kind:"scalar",resolve:i,construct:r,instanceOf:Date,represent:o})},{"../type":13}],30:[function(e,t,n){},{}],"/":[function(e,t,n){"use strict";var i=e("./lib/js-yaml.js");t.exports=i},{"./lib/js-yaml.js":1}]},{},[])("/")}); | ||
/* js-yaml 3.5.3 https://github.com/nodeca/js-yaml */ | ||
!function(e){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define([],e);else{var t;t="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this,t.jsyaml=e()}}(function(){return function e(t,n,i){function r(a,s){if(!n[a]){if(!t[a]){var c="function"==typeof require&&require;if(!s&&c)return c(a,!0);if(o)return o(a,!0);var u=new Error("Cannot find module '"+a+"'");throw u.code="MODULE_NOT_FOUND",u}var l=n[a]={exports:{}};t[a][0].call(l.exports,function(e){var n=t[a][1][e];return r(n?n:e)},l,l.exports,e,t,n,i)}return n[a].exports}for(var o="function"==typeof require&&require,a=0;a<i.length;a++)r(i[a]);return r}({1:[function(e,t,n){"use strict";function i(e){return function(){throw new Error("Function "+e+" is deprecated and cannot be used.")}}var r=e("./js-yaml/loader"),o=e("./js-yaml/dumper");t.exports.Type=e("./js-yaml/type"),t.exports.Schema=e("./js-yaml/schema"),t.exports.FAILSAFE_SCHEMA=e("./js-yaml/schema/failsafe"),t.exports.JSON_SCHEMA=e("./js-yaml/schema/json"),t.exports.CORE_SCHEMA=e("./js-yaml/schema/core"),t.exports.DEFAULT_SAFE_SCHEMA=e("./js-yaml/schema/default_safe"),t.exports.DEFAULT_FULL_SCHEMA=e("./js-yaml/schema/default_full"),t.exports.load=r.load,t.exports.loadAll=r.loadAll,t.exports.safeLoad=r.safeLoad,t.exports.safeLoadAll=r.safeLoadAll,t.exports.dump=o.dump,t.exports.safeDump=o.safeDump,t.exports.YAMLException=e("./js-yaml/exception"),t.exports.MINIMAL_SCHEMA=e("./js-yaml/schema/failsafe"),t.exports.SAFE_SCHEMA=e("./js-yaml/schema/default_safe"),t.exports.DEFAULT_SCHEMA=e("./js-yaml/schema/default_full"),t.exports.scan=i("scan"),t.exports.parse=i("parse"),t.exports.compose=i("compose"),t.exports.addConstructor=i("addConstructor")},{"./js-yaml/dumper":3,"./js-yaml/exception":4,"./js-yaml/loader":5,"./js-yaml/schema":7,"./js-yaml/schema/core":8,"./js-yaml/schema/default_full":9,"./js-yaml/schema/default_safe":10,"./js-yaml/schema/failsafe":11,"./js-yaml/schema/json":12,"./js-yaml/type":13}],2:[function(e,t,n){"use strict";function i(e){return"undefined"==typeof e||null===e}function r(e){return"object"==typeof e&&null!==e}function o(e){return Array.isArray(e)?e:i(e)?[]:[e]}function a(e,t){var n,i,r,o;if(t)for(o=Object.keys(t),n=0,i=o.length;i>n;n+=1)r=o[n],e[r]=t[r];return e}function s(e,t){var n,i="";for(n=0;t>n;n+=1)i+=e;return i}function c(e){return 0===e&&Number.NEGATIVE_INFINITY===1/e}t.exports.isNothing=i,t.exports.isObject=r,t.exports.toArray=o,t.exports.repeat=s,t.exports.isNegativeZero=c,t.exports.extend=a},{}],3:[function(e,t,n){"use strict";function i(e,t){var n,i,r,o,a,s,c;if(null===t)return{};for(n={},i=Object.keys(t),r=0,o=i.length;o>r;r+=1)a=i[r],s=String(t[a]),"!!"===a.slice(0,2)&&(a="tag:yaml.org,2002:"+a.slice(2)),c=e.compiledTypeMap[a],c&&F.call(c.styleAliases,s)&&(s=c.styleAliases[s]),n[a]=s;return n}function r(e){var t,n,i;if(t=e.toString(16).toUpperCase(),255>=e)n="x",i=2;else if(65535>=e)n="u",i=4;else{if(!(4294967295>=e))throw new I("code point within a string may not be greater than 0xFFFFFFFF");n="U",i=8}return"\\"+n+j.repeat("0",i-t.length)+t}function o(e){this.schema=e.schema||S,this.indent=Math.max(1,e.indent||2),this.skipInvalid=e.skipInvalid||!1,this.flowLevel=j.isNothing(e.flowLevel)?-1:e.flowLevel,this.styleMap=i(this.schema,e.styles||null),this.sortKeys=e.sortKeys||!1,this.lineWidth=e.lineWidth||80,this.noRefs=e.noRefs||!1,this.implicitTypes=this.schema.compiledImplicit,this.explicitTypes=this.schema.compiledExplicit,this.tag=null,this.result="",this.duplicates=[],this.usedDuplicates=null}function a(e,t){for(var n,i=j.repeat(" ",t),r=0,o=-1,a="",s=e.length;s>r;)o=e.indexOf("\n",r),-1===o?(n=e.slice(r),r=s):(n=e.slice(r,o+1),r=o+1),n.length&&"\n"!==n&&(a+=i),a+=n;return a}function s(e,t){return"\n"+j.repeat(" ",e.indent*t)}function c(e,t){var n,i,r;for(n=0,i=e.implicitTypes.length;i>n;n+=1)if(r=e.implicitTypes[n],r.resolve(t))return!0;return!1}function u(e){this.source=e,this.result="",this.checkpoint=0}function l(e,t,n,i){var r,o,s,l,f,m,g,y,x,v,A,b,w,k,C,j,I,S,E,O,F;if(0===t.length)return void(e.dump="''");if(-1!==te.indexOf(t))return void(e.dump="'"+t+"'");for(r=!0,o=t.length?t.charCodeAt(0):0,s=L===o||L===t.charCodeAt(t.length-1),($===o||W===o||G===o||z===o)&&(r=!1),s||e.flowLevel>-1&&e.flowLevel<=n?(s&&(r=!1),l=!1,f=!1):(l=!i,f=!i),m=!0,g=new u(t),y=!1,x=0,v=0,A=e.indent*n,b=e.lineWidth,-1===b&&(b=9007199254740991),40>A?b-=A:b=40,k=0;k<t.length;k++){if(w=t.charCodeAt(k),r){if(h(w))continue;r=!1}m&&w===R&&(m=!1),C=ee[w],j=d(w),(C||j)&&(w!==T&&w!==D&&w!==R?(l=!1,f=!1):w===T&&(y=!0,m=!1,k>0&&(I=t.charCodeAt(k-1),I===L&&(f=!1,l=!1)),l&&(S=k-x,x=k,S>v&&(v=S))),w!==D&&(m=!1),g.takeUpTo(k),g.escapeChar())}if(r&&c(e,t)&&(r=!1),E="",(l||f)&&(O=0,t.charCodeAt(t.length-1)===T&&(O+=1,t.charCodeAt(t.length-2)===T&&(O+=1)),0===O?E="-":2===O&&(E="+")),(f&&b>v||null!==e.tag)&&(l=!1),y||(f=!1),r)e.dump=t;else if(m)e.dump="'"+t+"'";else if(l)F=p(t,b),e.dump=">"+E+"\n"+a(F,A);else if(f)E||(t=t.replace(/\n$/,"")),e.dump="|"+E+"\n"+a(t,A);else{if(!g)throw new Error("Failed to dump scalar value");g.finish(),e.dump='"'+g.result+'"'}}function p(e,t){var n,i="",r=0,o=e.length,a=/\n+$/.exec(e);for(a&&(o=a.index+1);o>r;)n=e.indexOf("\n",r),n>o||-1===n?(i&&(i+="\n\n"),i+=f(e.slice(r,o),t),r=o):(i&&(i+="\n\n"),i+=f(e.slice(r,n),t),r=n+1);return a&&"\n"!==a[0]&&(i+=a[0]),i}function f(e,t){if(""===e)return e;for(var n,i,r,o=/[^\s] [^\s]/g,a="",s=0,c=0,u=o.exec(e);u;)n=u.index,n-c>t&&(i=s!==c?s:n,a&&(a+="\n"),r=e.slice(c,i),a+=r,c=i+1),s=n+1,u=o.exec(e);return a&&(a+="\n"),a+=c!==s&&e.length-c>t?e.slice(c,s)+"\n"+e.slice(s+1):e.slice(c)}function h(e){return N!==e&&T!==e&&_!==e&&P!==e&&V!==e&&Z!==e&&J!==e&&X!==e&&U!==e&&Y!==e&&B!==e&&M!==e&&Q!==e&&H!==e&&R!==e&&D!==e&&q!==e&&K!==e&&!ee[e]&&!d(e)}function d(e){return!(e>=32&&126>=e||133===e||e>=160&&55295>=e||e>=57344&&65533>=e||e>=65536&&1114111>=e)}function m(e,t,n){var i,r,o="",a=e.tag;for(i=0,r=n.length;r>i;i+=1)A(e,t,n[i],!1,!1)&&(0!==i&&(o+=", "),o+=e.dump);e.tag=a,e.dump="["+o+"]"}function g(e,t,n,i){var r,o,a="",c=e.tag;for(r=0,o=n.length;o>r;r+=1)A(e,t+1,n[r],!0,!0)&&(i&&0===r||(a+=s(e,t)),a+="- "+e.dump);e.tag=c,e.dump=a||"[]"}function y(e,t,n){var i,r,o,a,s,c="",u=e.tag,l=Object.keys(n);for(i=0,r=l.length;r>i;i+=1)s="",0!==i&&(s+=", "),o=l[i],a=n[o],A(e,t,o,!1,!1)&&(e.dump.length>1024&&(s+="? "),s+=e.dump+": ",A(e,t,a,!1,!1)&&(s+=e.dump,c+=s));e.tag=u,e.dump="{"+c+"}"}function x(e,t,n,i){var r,o,a,c,u,l,p="",f=e.tag,h=Object.keys(n);if(e.sortKeys===!0)h.sort();else if("function"==typeof e.sortKeys)h.sort(e.sortKeys);else if(e.sortKeys)throw new I("sortKeys must be a boolean or a function");for(r=0,o=h.length;o>r;r+=1)l="",i&&0===r||(l+=s(e,t)),a=h[r],c=n[a],A(e,t+1,a,!0,!0,!0)&&(u=null!==e.tag&&"?"!==e.tag||e.dump&&e.dump.length>1024,u&&(l+=e.dump&&T===e.dump.charCodeAt(0)?"?":"? "),l+=e.dump,u&&(l+=s(e,t)),A(e,t+1,c,!0,u)&&(l+=e.dump&&T===e.dump.charCodeAt(0)?":":": ",l+=e.dump,p+=l));e.tag=f,e.dump=p||"{}"}function v(e,t,n){var i,r,o,a,s,c;for(r=n?e.explicitTypes:e.implicitTypes,o=0,a=r.length;a>o;o+=1)if(s=r[o],(s.instanceOf||s.predicate)&&(!s.instanceOf||"object"==typeof t&&t instanceof s.instanceOf)&&(!s.predicate||s.predicate(t))){if(e.tag=n?s.tag:"?",s.represent){if(c=e.styleMap[s.tag]||s.defaultStyle,"[object Function]"===O.call(s.represent))i=s.represent(t,c);else{if(!F.call(s.represent,c))throw new I("!<"+s.tag+'> tag resolver accepts not "'+c+'" style');i=s.represent[c](t,c)}e.dump=i}return!0}return!1}function A(e,t,n,i,r,o){e.tag=null,e.dump=n,v(e,n,!1)||v(e,n,!0);var a=O.call(e.dump);i&&(i=e.flowLevel<0||e.flowLevel>t);var s,c,u="[object Object]"===a||"[object Array]"===a;if(u&&(s=e.duplicates.indexOf(n),c=-1!==s),(null!==e.tag&&"?"!==e.tag||c||2!==e.indent&&t>0)&&(r=!1),c&&e.usedDuplicates[s])e.dump="*ref_"+s;else{if(u&&c&&!e.usedDuplicates[s]&&(e.usedDuplicates[s]=!0),"[object Object]"===a)i&&0!==Object.keys(e.dump).length?(x(e,t,e.dump,r),c&&(e.dump="&ref_"+s+e.dump)):(y(e,t,e.dump),c&&(e.dump="&ref_"+s+" "+e.dump));else if("[object Array]"===a)i&&0!==e.dump.length?(g(e,t,e.dump,r),c&&(e.dump="&ref_"+s+e.dump)):(m(e,t,e.dump),c&&(e.dump="&ref_"+s+" "+e.dump));else{if("[object String]"!==a){if(e.skipInvalid)return!1;throw new I("unacceptable kind of an object to dump "+a)}"?"!==e.tag&&l(e,e.dump,t,o)}null!==e.tag&&"?"!==e.tag&&(e.dump="!<"+e.tag+"> "+e.dump)}return!0}function b(e,t){var n,i,r=[],o=[];for(w(e,r,o),n=0,i=o.length;i>n;n+=1)t.duplicates.push(r[o[n]]);t.usedDuplicates=new Array(i)}function w(e,t,n){var i,r,o;if(null!==e&&"object"==typeof e)if(r=t.indexOf(e),-1!==r)-1===n.indexOf(r)&&n.push(r);else if(t.push(e),Array.isArray(e))for(r=0,o=e.length;o>r;r+=1)w(e[r],t,n);else for(i=Object.keys(e),r=0,o=i.length;o>r;r+=1)w(e[i[r]],t,n)}function k(e,t){t=t||{};var n=new o(t);return n.noRefs||b(e,n),A(n,0,e,!0,!0)?n.dump+"\n":""}function C(e,t){return k(e,j.extend({schema:E},t))}var j=e("./common"),I=e("./exception"),S=e("./schema/default_full"),E=e("./schema/default_safe"),O=Object.prototype.toString,F=Object.prototype.hasOwnProperty,N=9,T=10,_=13,L=32,M=33,D=34,U=35,q=37,Y=38,R=39,B=42,P=44,$=45,K=58,H=62,W=63,G=64,V=91,Z=93,z=96,J=123,Q=124,X=125,ee={};ee[0]="\\0",ee[7]="\\a",ee[8]="\\b",ee[9]="\\t",ee[10]="\\n",ee[11]="\\v",ee[12]="\\f",ee[13]="\\r",ee[27]="\\e",ee[34]='\\"',ee[92]="\\\\",ee[133]="\\N",ee[160]="\\_",ee[8232]="\\L",ee[8233]="\\P";var te=["y","Y","yes","Yes","YES","on","On","ON","n","N","no","No","NO","off","Off","OFF"];u.prototype.takeUpTo=function(e){var t;if(e<this.checkpoint)throw t=new Error("position should be > checkpoint"),t.position=e,t.checkpoint=this.checkpoint,t;return this.result+=this.source.slice(this.checkpoint,e),this.checkpoint=e,this},u.prototype.escapeChar=function(){var e,t;return e=this.source.charCodeAt(this.checkpoint),t=ee[e]||r(e),this.result+=t,this.checkpoint+=1,this},u.prototype.finish=function(){this.source.length>this.checkpoint&&this.takeUpTo(this.source.length)},t.exports.dump=k,t.exports.safeDump=C},{"./common":2,"./exception":4,"./schema/default_full":9,"./schema/default_safe":10}],4:[function(e,t,n){"use strict";function i(e,t){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=(new Error).stack||"",this.name="YAMLException",this.reason=e,this.mark=t,this.message=(this.reason||"(unknown reason)")+(this.mark?" "+this.mark.toString():"")}i.prototype=Object.create(Error.prototype),i.prototype.constructor=i,i.prototype.toString=function(e){var t=this.name+": ";return t+=this.reason||"(unknown reason)",!e&&this.mark&&(t+=" "+this.mark.toString()),t},t.exports=i},{}],5:[function(e,t,n){"use strict";function i(e){return 10===e||13===e}function r(e){return 9===e||32===e}function o(e){return 9===e||32===e||10===e||13===e}function a(e){return 44===e||91===e||93===e||123===e||125===e}function s(e){var t;return e>=48&&57>=e?e-48:(t=32|e,t>=97&&102>=t?t-97+10:-1)}function c(e){return 120===e?2:117===e?4:85===e?8:0}function u(e){return e>=48&&57>=e?e-48:-1}function l(e){return 48===e?"\x00":97===e?"":98===e?"\b":116===e?" ":9===e?" ":110===e?"\n":118===e?"\x0B":102===e?"\f":114===e?"\r":101===e?"":32===e?" ":34===e?'"':47===e?"/":92===e?"\\":78===e?" ":95===e?" ":76===e?"\u2028":80===e?"\u2029":""}function p(e){return 65535>=e?String.fromCharCode(e):String.fromCharCode((e-65536>>10)+55296,(e-65536&1023)+56320)}function f(e,t){this.input=e,this.filename=t.filename||null,this.schema=t.schema||K,this.onWarning=t.onWarning||null,this.legacy=t.legacy||!1,this.json=t.json||!1,this.listener=t.listener||null,this.implicitTypes=this.schema.compiledImplicit,this.typeMap=this.schema.compiledTypeMap,this.length=e.length,this.position=0,this.line=0,this.lineStart=0,this.lineIndent=0,this.documents=[]}function h(e,t){return new B(t,new P(e.filename,e.input,e.position,e.line,e.position-e.lineStart))}function d(e,t){throw h(e,t)}function m(e,t){e.onWarning&&e.onWarning.call(null,h(e,t))}function g(e,t,n,i){var r,o,a,s;if(n>t){if(s=e.input.slice(t,n),i)for(r=0,o=s.length;o>r;r+=1)a=s.charCodeAt(r),9===a||a>=32&&1114111>=a||d(e,"expected valid JSON character");else X.test(s)&&d(e,"the stream contains non-printable characters");e.result+=s}}function y(e,t,n,i){var r,o,a,s;for(R.isObject(n)||d(e,"cannot merge mappings; the provided source object is unacceptable"),r=Object.keys(n),a=0,s=r.length;s>a;a+=1)o=r[a],H.call(t,o)||(t[o]=n[o],i[o]=!0)}function x(e,t,n,i,r,o){var a,s;if(r=String(r),null===t&&(t={}),"tag:yaml.org,2002:merge"===i)if(Array.isArray(o))for(a=0,s=o.length;s>a;a+=1)y(e,t,o[a],n);else y(e,t,o,n);else e.json||H.call(n,r)||!H.call(t,r)||d(e,"duplicated mapping key"),t[r]=o,delete n[r];return t}function v(e){var t;t=e.input.charCodeAt(e.position),10===t?e.position++:13===t?(e.position++,10===e.input.charCodeAt(e.position)&&e.position++):d(e,"a line break is expected"),e.line+=1,e.lineStart=e.position}function A(e,t,n){for(var o=0,a=e.input.charCodeAt(e.position);0!==a;){for(;r(a);)a=e.input.charCodeAt(++e.position);if(t&&35===a)do a=e.input.charCodeAt(++e.position);while(10!==a&&13!==a&&0!==a);if(!i(a))break;for(v(e),a=e.input.charCodeAt(e.position),o++,e.lineIndent=0;32===a;)e.lineIndent++,a=e.input.charCodeAt(++e.position)}return-1!==n&&0!==o&&e.lineIndent<n&&m(e,"deficient indentation"),o}function b(e){var t,n=e.position;return t=e.input.charCodeAt(n),45!==t&&46!==t||t!==e.input.charCodeAt(n+1)||t!==e.input.charCodeAt(n+2)||(n+=3,t=e.input.charCodeAt(n),0!==t&&!o(t))?!1:!0}function w(e,t){1===t?e.result+=" ":t>1&&(e.result+=R.repeat("\n",t-1))}function k(e,t,n){var s,c,u,l,p,f,h,d,m,y=e.kind,x=e.result;if(m=e.input.charCodeAt(e.position),o(m)||a(m)||35===m||38===m||42===m||33===m||124===m||62===m||39===m||34===m||37===m||64===m||96===m)return!1;if((63===m||45===m)&&(c=e.input.charCodeAt(e.position+1),o(c)||n&&a(c)))return!1;for(e.kind="scalar",e.result="",u=l=e.position,p=!1;0!==m;){if(58===m){if(c=e.input.charCodeAt(e.position+1),o(c)||n&&a(c))break}else if(35===m){if(s=e.input.charCodeAt(e.position-1),o(s))break}else{if(e.position===e.lineStart&&b(e)||n&&a(m))break;if(i(m)){if(f=e.line,h=e.lineStart,d=e.lineIndent,A(e,!1,-1),e.lineIndent>=t){p=!0,m=e.input.charCodeAt(e.position);continue}e.position=l,e.line=f,e.lineStart=h,e.lineIndent=d;break}}p&&(g(e,u,l,!1),w(e,e.line-f),u=l=e.position,p=!1),r(m)||(l=e.position+1),m=e.input.charCodeAt(++e.position)}return g(e,u,l,!1),e.result?!0:(e.kind=y,e.result=x,!1)}function C(e,t){var n,r,o;if(n=e.input.charCodeAt(e.position),39!==n)return!1;for(e.kind="scalar",e.result="",e.position++,r=o=e.position;0!==(n=e.input.charCodeAt(e.position));)if(39===n){if(g(e,r,e.position,!0),n=e.input.charCodeAt(++e.position),39!==n)return!0;r=o=e.position,e.position++}else i(n)?(g(e,r,o,!0),w(e,A(e,!1,t)),r=o=e.position):e.position===e.lineStart&&b(e)?d(e,"unexpected end of the document within a single quoted scalar"):(e.position++,o=e.position);d(e,"unexpected end of the stream within a single quoted scalar")}function j(e,t){var n,r,o,a,u,l;if(l=e.input.charCodeAt(e.position),34!==l)return!1;for(e.kind="scalar",e.result="",e.position++,n=r=e.position;0!==(l=e.input.charCodeAt(e.position));){if(34===l)return g(e,n,e.position,!0),e.position++,!0;if(92===l){if(g(e,n,e.position,!0),l=e.input.charCodeAt(++e.position),i(l))A(e,!1,t);else if(256>l&&re[l])e.result+=oe[l],e.position++;else if((u=c(l))>0){for(o=u,a=0;o>0;o--)l=e.input.charCodeAt(++e.position),(u=s(l))>=0?a=(a<<4)+u:d(e,"expected hexadecimal character");e.result+=p(a),e.position++}else d(e,"unknown escape sequence");n=r=e.position}else i(l)?(g(e,n,r,!0),w(e,A(e,!1,t)),n=r=e.position):e.position===e.lineStart&&b(e)?d(e,"unexpected end of the document within a double quoted scalar"):(e.position++,r=e.position)}d(e,"unexpected end of the stream within a double quoted scalar")}function I(e,t){var n,i,r,a,s,c,u,l,p,f,h,m=!0,g=e.tag,y=e.anchor,v={};if(h=e.input.charCodeAt(e.position),91===h)a=93,u=!1,i=[];else{if(123!==h)return!1;a=125,u=!0,i={}}for(null!==e.anchor&&(e.anchorMap[e.anchor]=i),h=e.input.charCodeAt(++e.position);0!==h;){if(A(e,!0,t),h=e.input.charCodeAt(e.position),h===a)return e.position++,e.tag=g,e.anchor=y,e.kind=u?"mapping":"sequence",e.result=i,!0;m||d(e,"missed comma between flow collection entries"),p=l=f=null,s=c=!1,63===h&&(r=e.input.charCodeAt(e.position+1),o(r)&&(s=c=!0,e.position++,A(e,!0,t))),n=e.line,_(e,t,W,!1,!0),p=e.tag,l=e.result,A(e,!0,t),h=e.input.charCodeAt(e.position),!c&&e.line!==n||58!==h||(s=!0,h=e.input.charCodeAt(++e.position),A(e,!0,t),_(e,t,W,!1,!0),f=e.result),u?x(e,i,v,p,l,f):s?i.push(x(e,null,v,p,l,f)):i.push(l),A(e,!0,t),h=e.input.charCodeAt(e.position),44===h?(m=!0,h=e.input.charCodeAt(++e.position)):m=!1}d(e,"unexpected end of the stream within a flow collection")}function S(e,t){var n,o,a,s,c=z,l=!1,p=t,f=0,h=!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?Q:J:d(e,"repeat of a chomping mode identifier");else{if(!((a=u(s))>=0))break;0===a?d(e,"bad explicit indentation width of a block scalar; it cannot be less than one"):l?d(e,"repeat of an indentation width identifier"):(p=t+a-1,l=!0)}if(r(s)){do s=e.input.charCodeAt(++e.position);while(r(s));if(35===s)do s=e.input.charCodeAt(++e.position);while(!i(s)&&0!==s)}for(;0!==s;){for(v(e),e.lineIndent=0,s=e.input.charCodeAt(e.position);(!l||e.lineIndent<p)&&32===s;)e.lineIndent++,s=e.input.charCodeAt(++e.position);if(!l&&e.lineIndent>p&&(p=e.lineIndent),i(s))f++;else{if(e.lineIndent<p){c===Q?e.result+=R.repeat("\n",f):c===z&&l&&(e.result+="\n");break}for(o?r(s)?(h=!0,e.result+=R.repeat("\n",f+1)):h?(h=!1,e.result+=R.repeat("\n",f+1)):0===f?l&&(e.result+=" "):e.result+=R.repeat("\n",f):l?e.result+=R.repeat("\n",f+1):e.result+=R.repeat("\n",f),l=!0,f=0,n=e.position;!i(s)&&0!==s;)s=e.input.charCodeAt(++e.position);g(e,n,e.position,!1)}}return!0}function E(e,t){var n,i,r,a=e.tag,s=e.anchor,c=[],u=!1;for(null!==e.anchor&&(e.anchorMap[e.anchor]=c),r=e.input.charCodeAt(e.position);0!==r&&45===r&&(i=e.input.charCodeAt(e.position+1),o(i));)if(u=!0,e.position++,A(e,!0,-1)&&e.lineIndent<=t)c.push(null),r=e.input.charCodeAt(e.position);else if(n=e.line,_(e,t,V,!1,!0),c.push(e.result),A(e,!0,-1),r=e.input.charCodeAt(e.position),(e.line===n||e.lineIndent>t)&&0!==r)d(e,"bad indentation of a sequence entry");else if(e.lineIndent<t)break;return u?(e.tag=a,e.anchor=s,e.kind="sequence",e.result=c,!0):!1}function O(e,t,n){var i,a,s,c,u=e.tag,l=e.anchor,p={},f={},h=null,m=null,g=null,y=!1,v=!1;for(null!==e.anchor&&(e.anchorMap[e.anchor]=p),c=e.input.charCodeAt(e.position);0!==c;){if(i=e.input.charCodeAt(e.position+1),s=e.line,63!==c&&58!==c||!o(i)){if(!_(e,n,G,!1,!0))break;if(e.line===s){for(c=e.input.charCodeAt(e.position);r(c);)c=e.input.charCodeAt(++e.position);if(58===c)c=e.input.charCodeAt(++e.position),o(c)||d(e,"a whitespace character is expected after the key-value separator within a block mapping"),y&&(x(e,p,f,h,m,null),h=m=g=null),v=!0,y=!1,a=!1,h=e.tag,m=e.result;else{if(!v)return e.tag=u,e.anchor=l,!0;d(e,"can not read an implicit mapping pair; a colon is missed")}}else{if(!v)return e.tag=u,e.anchor=l,!0;d(e,"can not read a block mapping entry; a multiline key may not be an implicit key")}}else 63===c?(y&&(x(e,p,f,h,m,null),h=m=g=null),v=!0,y=!0,a=!0):y?(y=!1,a=!0):d(e,"incomplete explicit mapping pair; a key node is missed"),e.position+=1,c=i;if((e.line===s||e.lineIndent>t)&&(_(e,t,Z,!0,a)&&(y?m=e.result:g=e.result),y||(x(e,p,f,h,m,g),h=m=g=null),A(e,!0,-1),c=e.input.charCodeAt(e.position)),e.lineIndent>t&&0!==c)d(e,"bad indentation of a mapping entry");else if(e.lineIndent<t)break}return y&&x(e,p,f,h,m,null),v&&(e.tag=u,e.anchor=l,e.kind="mapping",e.result=p),v}function F(e){var t,n,i,r,a=!1,s=!1;if(r=e.input.charCodeAt(e.position),33!==r)return!1;if(null!==e.tag&&d(e,"duplication of a tag property"),r=e.input.charCodeAt(++e.position),60===r?(a=!0,r=e.input.charCodeAt(++e.position)):33===r?(s=!0,n="!!",r=e.input.charCodeAt(++e.position)):n="!",t=e.position,a){do r=e.input.charCodeAt(++e.position);while(0!==r&&62!==r);e.position<e.length?(i=e.input.slice(t,e.position),r=e.input.charCodeAt(++e.position)):d(e,"unexpected end of the stream within a verbatim tag")}else{for(;0!==r&&!o(r);)33===r&&(s?d(e,"tag suffix cannot contain exclamation marks"):(n=e.input.slice(t-1,e.position+1),ne.test(n)||d(e,"named tag handle cannot contain such characters"),s=!0,t=e.position+1)),r=e.input.charCodeAt(++e.position);i=e.input.slice(t,e.position),te.test(i)&&d(e,"tag suffix cannot contain flow indicator characters")}return i&&!ie.test(i)&&d(e,"tag name cannot contain such characters: "+i),a?e.tag=i:H.call(e.tagMap,n)?e.tag=e.tagMap[n]+i:"!"===n?e.tag="!"+i:"!!"===n?e.tag="tag:yaml.org,2002:"+i:d(e,'undeclared tag handle "'+n+'"'),!0}function N(e){var t,n;if(n=e.input.charCodeAt(e.position),38!==n)return!1;for(null!==e.anchor&&d(e,"duplication of an anchor property"),n=e.input.charCodeAt(++e.position),t=e.position;0!==n&&!o(n)&&!a(n);)n=e.input.charCodeAt(++e.position);return e.position===t&&d(e,"name of an anchor node must contain at least one character"),e.anchor=e.input.slice(t,e.position),!0}function T(e){var t,n,i;if(i=e.input.charCodeAt(e.position),42!==i)return!1;for(i=e.input.charCodeAt(++e.position),t=e.position;0!==i&&!o(i)&&!a(i);)i=e.input.charCodeAt(++e.position);return e.position===t&&d(e,"name of an alias node must contain at least one character"),n=e.input.slice(t,e.position),e.anchorMap.hasOwnProperty(n)||d(e,'unidentified alias "'+n+'"'),e.result=e.anchorMap[n],A(e,!0,-1),!0}function _(e,t,n,i,r){var o,a,s,c,u,l,p,f,h=1,m=!1,g=!1;if(null!==e.listener&&e.listener("open",e),e.tag=null,e.anchor=null,e.kind=null,e.result=null,o=a=s=Z===n||V===n,i&&A(e,!0,-1)&&(m=!0,e.lineIndent>t?h=1:e.lineIndent===t?h=0:e.lineIndent<t&&(h=-1)),1===h)for(;F(e)||N(e);)A(e,!0,-1)?(m=!0,s=o,e.lineIndent>t?h=1:e.lineIndent===t?h=0:e.lineIndent<t&&(h=-1)):s=!1;if(s&&(s=m||r),(1===h||Z===n)&&(p=W===n||G===n?t:t+1,f=e.position-e.lineStart,1===h?s&&(E(e,f)||O(e,f,p))||I(e,p)?g=!0:(a&&S(e,p)||C(e,p)||j(e,p)?g=!0:T(e)?(g=!0,(null!==e.tag||null!==e.anchor)&&d(e,"alias node should not have any properties")):k(e,p,W===n)&&(g=!0,null===e.tag&&(e.tag="?")),null!==e.anchor&&(e.anchorMap[e.anchor]=e.result)):0===h&&(g=s&&E(e,f))),null!==e.tag&&"!"!==e.tag)if("?"===e.tag){for(c=0,u=e.implicitTypes.length;u>c;c+=1)if(l=e.implicitTypes[c],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 H.call(e.typeMap,e.tag)?(l=e.typeMap[e.tag],null!==e.result&&l.kind!==e.kind&&d(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)):d(e,"cannot resolve a node with !<"+e.tag+"> explicit tag")):d(e,"unknown tag !<"+e.tag+">");return null!==e.listener&&e.listener("close",e),null!==e.tag||null!==e.anchor||g}function L(e){var t,n,a,s,c=e.position,u=!1;for(e.version=null,e.checkLineBreaks=e.legacy,e.tagMap={},e.anchorMap={};0!==(s=e.input.charCodeAt(e.position))&&(A(e,!0,-1),s=e.input.charCodeAt(e.position),!(e.lineIndent>0||37!==s));){for(u=!0,s=e.input.charCodeAt(++e.position),t=e.position;0!==s&&!o(s);)s=e.input.charCodeAt(++e.position);for(n=e.input.slice(t,e.position),a=[],n.length<1&&d(e,"directive name must not be less than one character in length");0!==s;){for(;r(s);)s=e.input.charCodeAt(++e.position);if(35===s){do s=e.input.charCodeAt(++e.position);while(0!==s&&!i(s));break}if(i(s))break;for(t=e.position;0!==s&&!o(s);)s=e.input.charCodeAt(++e.position);a.push(e.input.slice(t,e.position))}0!==s&&v(e),H.call(se,n)?se[n](e,n,a):m(e,'unknown document directive "'+n+'"')}return A(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,A(e,!0,-1)):u&&d(e,"directives end mark is expected"),_(e,e.lineIndent-1,Z,!1,!0),A(e,!0,-1),e.checkLineBreaks&&ee.test(e.input.slice(c,e.position))&&m(e,"non-ASCII line breaks are interpreted as content"),e.documents.push(e.result),e.position===e.lineStart&&b(e)?void(46===e.input.charCodeAt(e.position)&&(e.position+=3,A(e,!0,-1))):void(e.position<e.length-1&&d(e,"end of the stream or a document separator is expected"))}function M(e,t){e=String(e),t=t||{},0!==e.length&&(10!==e.charCodeAt(e.length-1)&&13!==e.charCodeAt(e.length-1)&&(e+="\n"),65279===e.charCodeAt(0)&&(e=e.slice(1)));var n=new f(e,t);for(n.input+="\x00";32===n.input.charCodeAt(n.position);)n.lineIndent+=1,n.position+=1;for(;n.position<n.length-1;)L(n);return n.documents}function D(e,t,n){var i,r,o=M(e,n);for(i=0,r=o.length;r>i;i+=1)t(o[i])}function U(e,t){var n=M(e,t);if(0!==n.length){if(1===n.length)return n[0];throw new B("expected a single document in the stream, but found more")}}function q(e,t,n){D(e,t,R.extend({schema:$},n))}function Y(e,t){return U(e,R.extend({schema:$},t))}for(var R=e("./common"),B=e("./exception"),P=e("./mark"),$=e("./schema/default_safe"),K=e("./schema/default_full"),H=Object.prototype.hasOwnProperty,W=1,G=2,V=3,Z=4,z=1,J=2,Q=3,X=/[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,ee=/[\x85\u2028\u2029]/,te=/[,\[\]\{\}]/,ne=/^(?:!|!!|![a-z\-]+!)$/i,ie=/^(?:!|[^,\[\]\{\}])(?:%[0-9a-f]{2}|[0-9a-z\-#;\/\?:@&=\+\$,_\.!~\*'\(\)\[\]])*$/i,re=new Array(256),oe=new Array(256),ae=0;256>ae;ae++)re[ae]=l(ae)?1:0,oe[ae]=l(ae);var se={YAML:function(e,t,n){var i,r,o;null!==e.version&&d(e,"duplication of %YAML directive"),1!==n.length&&d(e,"YAML directive accepts exactly one argument"),i=/^([0-9]+)\.([0-9]+)$/.exec(n[0]),null===i&&d(e,"ill-formed argument of the YAML directive"),r=parseInt(i[1],10),o=parseInt(i[2],10),1!==r&&d(e,"unacceptable YAML version of the document"),e.version=n[0],e.checkLineBreaks=2>o,1!==o&&2!==o&&m(e,"unsupported YAML version of the document")},TAG:function(e,t,n){var i,r;2!==n.length&&d(e,"TAG directive accepts exactly two arguments"),i=n[0],r=n[1],ne.test(i)||d(e,"ill-formed tag handle (first argument) of the TAG directive"),H.call(e.tagMap,i)&&d(e,'there is a previously declared suffix for "'+i+'" tag handle'),ie.test(r)||d(e,"ill-formed tag prefix (second argument) of the TAG directive"),e.tagMap[i]=r}};t.exports.loadAll=D,t.exports.load=U,t.exports.safeLoadAll=q,t.exports.safeLoad=Y},{"./common":2,"./exception":4,"./mark":6,"./schema/default_full":9,"./schema/default_safe":10}],6:[function(e,t,n){"use strict";function i(e,t,n,i,r){this.name=e,this.buffer=t,this.position=n,this.line=i,this.column=r}var r=e("./common");i.prototype.getSnippet=function(e,t){var n,i,o,a,s;if(!this.buffer)return null;for(e=e||4,t=t||75,n="",i=this.position;i>0&&-1==="\x00\r\n \u2028\u2029".indexOf(this.buffer.charAt(i-1));)if(i-=1,this.position-i>t/2-1){n=" ... ",i+=5;break}for(o="",a=this.position;a<this.buffer.length&&-1==="\x00\r\n \u2028\u2029".indexOf(this.buffer.charAt(a));)if(a+=1,a-this.position>t/2-1){o=" ... ",a-=5;break}return s=this.buffer.slice(i,a),r.repeat(" ",e)+n+s+o+"\n"+r.repeat(" ",e+this.position-i+n.length)+"^"},i.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=i},{"./common":2}],7:[function(e,t,n){"use strict";function i(e,t,n){var r=[];return e.include.forEach(function(e){n=i(e,t,n)}),e[t].forEach(function(e){n.forEach(function(t,n){t.tag===e.tag&&r.push(n)}),n.push(e)}),n.filter(function(e,t){return-1===r.indexOf(t)})}function r(){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 o(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 s("There is a non-scalar type in the implicit list of a schema. Implicit resolving of such types is not supported.")}),this.compiledImplicit=i(this,"implicit",[]),this.compiledExplicit=i(this,"explicit",[]),this.compiledTypeMap=r(this.compiledImplicit,this.compiledExplicit)}var a=e("./common"),s=e("./exception"),c=e("./type");o.DEFAULT=null,o.create=function(){var e,t;switch(arguments.length){case 1:e=o.DEFAULT,t=arguments[0];break;case 2:e=arguments[0],t=arguments[1];break;default:throw new s("Wrong number of arguments for Schema.create function")}if(e=a.toArray(e),t=a.toArray(t),!e.every(function(e){return e instanceof o}))throw new s("Specified list of super schemas (or a single Schema object) contains a non-Schema object.");if(!t.every(function(e){return e instanceof c}))throw new s("Specified list of YAML types (or a single Type object) contains a non-Type object.");return new o({include:e,explicit:t})},t.exports=o},{"./common":2,"./exception":4,"./type":13}],8:[function(e,t,n){"use strict";var i=e("../schema");t.exports=new i({include:[e("./json")]})},{"../schema":7,"./json":12}],9:[function(e,t,n){"use strict";var i=e("../schema");t.exports=i.DEFAULT=new i({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,n){"use strict";var i=e("../schema");t.exports=new i({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,n){"use strict";var i=e("../schema");t.exports=new i({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,n){"use strict";var i=e("../schema");t.exports=new i({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,n){"use strict";function i(e){var t={};return null!==e&&Object.keys(e).forEach(function(n){e[n].forEach(function(e){t[String(e)]=n})}),t}function r(e,t){if(t=t||{},Object.keys(t).forEach(function(t){if(-1===a.indexOf(t))throw new o('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=i(t.styleAliases||null),-1===s.indexOf(this.kind))throw new o('Unknown kind "'+this.kind+'" is specified for "'+e+'" YAML type.')}var o=e("./exception"),a=["kind","resolve","construct","instanceOf","predicate","represent","defaultStyle","styleAliases"],s=["scalar","sequence","mapping"];t.exports=r},{"./exception":4}],14:[function(e,t,n){"use strict";function i(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 r(e){var t,n,i=e.replace(/[\r\n=]/g,""),r=i.length,o=u,a=0,c=[];for(t=0;r>t;t++)t%4===0&&t&&(c.push(a>>16&255),c.push(a>>8&255),c.push(255&a)),a=a<<6|o.indexOf(i.charAt(t));return n=r%4*6,0===n?(c.push(a>>16&255),c.push(a>>8&255),c.push(255&a)):18===n?(c.push(a>>10&255),c.push(a>>2&255)):12===n&&c.push(a>>4&255),s?new s(c):c}function o(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 a(e){return s&&s.isBuffer(e)}var s=e("buffer").Buffer,c=e("../type"),u="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=\n\r";t.exports=new c("tag:yaml.org,2002:binary",{kind:"scalar",resolve:i,construct:r,predicate:a,represent:o})},{"../type":13,buffer:30}],15:[function(e,t,n){"use strict";function i(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 r(e){return"true"===e||"True"===e||"TRUE"===e}function o(e){return"[object Boolean]"===Object.prototype.toString.call(e)}var a=e("../type");t.exports=new a("tag:yaml.org,2002:bool",{kind:"scalar",resolve:i,construct:r,predicate:o,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,n){"use strict";function i(e){return null===e?!1:u.test(e)?!0:!1}function r(e){var t,n,i,r;return t=e.replace(/_/g,"").toLowerCase(),n="-"===t[0]?-1:1,r=[],"+-".indexOf(t[0])>=0&&(t=t.slice(1)),".inf"===t?1===n?Number.POSITIVE_INFINITY:Number.NEGATIVE_INFINITY:".nan"===t?NaN:t.indexOf(":")>=0?(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 o(e,t){var n;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)switch(t){case"lowercase":return"-.inf";case"uppercase":return"-.INF";case"camelcase":return"-.Inf"}else if(s.isNegativeZero(e))return"-0.0";return n=e.toString(10),l.test(n)?n.replace("e",".e"):n}function a(e){return"[object Number]"===Object.prototype.toString.call(e)&&(e%1!==0||s.isNegativeZero(e))}var s=e("../common"),c=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))$"),l=/^[-+]?[0-9]+e/;t.exports=new c("tag:yaml.org,2002:float",{kind:"scalar",resolve:i,construct:r,predicate:a,represent:o,defaultStyle:"lowercase"})},{"../common":2,"../type":13}],17:[function(e,t,n){"use strict";function i(e){return e>=48&&57>=e||e>=65&&70>=e||e>=97&&102>=e}function r(e){return e>=48&&55>=e}function o(e){return e>=48&&57>=e}function a(e){if(null===e)return!1;var t,n=e.length,a=0,s=!1;if(!n)return!1;if(t=e[a],("-"===t||"+"===t)&&(t=e[++a]),"0"===t){if(a+1===n)return!0;if(t=e[++a],"b"===t){for(a++;n>a;a++)if(t=e[a],"_"!==t){if("0"!==t&&"1"!==t)return!1;s=!0}return s}if("x"===t){for(a++;n>a;a++)if(t=e[a],"_"!==t){if(!i(e.charCodeAt(a)))return!1;s=!0}return s}for(;n>a;a++)if(t=e[a],"_"!==t){if(!r(e.charCodeAt(a)))return!1;s=!0}return s}for(;n>a;a++)if(t=e[a],"_"!==t){if(":"===t)break;if(!o(e.charCodeAt(a)))return!1;s=!0}return s?":"!==t?!0:/^(:[0-5]?[0-9])+$/.test(e.slice(a)):!1}function s(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 c(e){return"[object Number]"===Object.prototype.toString.call(e)&&e%1===0&&!u.isNegativeZero(e)}var u=e("../common"),l=e("../type");t.exports=new l("tag:yaml.org,2002:int",{kind:"scalar",resolve:a,construct:s,predicate:c,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,n){"use strict";function i(e){if(null===e)return!1;try{var t="("+e+")",n=s.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 r(e){var t,n="("+e+")",i=s.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 o(e){return e.toString()}function a(e){return"[object Function]"===Object.prototype.toString.call(e)}var s;try{var c=e;s=c("esprima")}catch(u){"undefined"!=typeof window&&(s=window.esprima)}var l=e("../../type");t.exports=new l("tag:yaml.org,2002:js/function",{kind:"scalar",resolve:i,construct:r,predicate:a,represent:o})},{"../../type":13}],19:[function(e,t,n){"use strict";function i(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}return!0}function r(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 o(e){var t="/"+e.source+"/";return e.global&&(t+="g"),e.multiline&&(t+="m"),e.ignoreCase&&(t+="i"),t}function a(e){return"[object RegExp]"===Object.prototype.toString.call(e)}var s=e("../../type");t.exports=new s("tag:yaml.org,2002:js/regexp",{kind:"scalar",resolve:i,construct:r,predicate:a,represent:o})},{"../../type":13}],20:[function(e,t,n){"use strict";function i(){return!0}function r(){}function o(){return""}function a(e){return"undefined"==typeof e}var s=e("../../type");t.exports=new s("tag:yaml.org,2002:js/undefined",{kind:"scalar",resolve:i,construct:r,predicate:a,represent:o})},{"../../type":13}],21:[function(e,t,n){"use strict";var i=e("../type");t.exports=new i("tag:yaml.org,2002:map",{kind:"mapping",construct:function(e){return null!==e?e:{}}})},{"../type":13}],22:[function(e,t,n){"use strict";function i(e){return"<<"===e||null===e}var r=e("../type");t.exports=new r("tag:yaml.org,2002:merge",{kind:"scalar",resolve:i})},{"../type":13}],23:[function(e,t,n){"use strict";function i(e){if(null===e)return!0;var t=e.length;return 1===t&&"~"===e||4===t&&("null"===e||"Null"===e||"NULL"===e)}function r(){return null}function o(e){return null===e}var a=e("../type");t.exports=new a("tag:yaml.org,2002:null",{kind:"scalar",resolve:i,construct:r,predicate:o,represent:{canonical:function(){return"~"},lowercase:function(){return"null"},uppercase:function(){return"NULL"},camelcase:function(){return"Null"}},defaultStyle:"lowercase"})},{"../type":13}],24:[function(e,t,n){"use strict";function i(e){if(null===e)return!0;var t,n,i,r,o,c=[],u=e;for(t=0,n=u.length;n>t;t+=1){if(i=u[t],o=!1,"[object Object]"!==s.call(i))return!1;for(r in i)if(a.call(i,r)){if(o)return!1;o=!0}if(!o)return!1;if(-1!==c.indexOf(r))return!1;c.push(r)}return!0}function r(e){return null!==e?e:[]}var o=e("../type"),a=Object.prototype.hasOwnProperty,s=Object.prototype.toString;t.exports=new o("tag:yaml.org,2002:omap",{kind:"sequence",resolve:i,construct:r})},{"../type":13}],25:[function(e,t,n){"use strict";function i(e){if(null===e)return!0;var t,n,i,r,o,s=e;for(o=new Array(s.length),t=0,n=s.length;n>t;t+=1){if(i=s[t],"[object Object]"!==a.call(i))return!1;if(r=Object.keys(i),1!==r.length)return!1;o[t]=[r[0],i[r[0]]]}return!0}function r(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 o=e("../type"),a=Object.prototype.toString;t.exports=new o("tag:yaml.org,2002:pairs",{kind:"sequence",resolve:i,construct:r})},{"../type":13}],26:[function(e,t,n){"use strict";var i=e("../type");t.exports=new i("tag:yaml.org,2002:seq",{kind:"sequence",construct:function(e){return null!==e?e:[]}})},{"../type":13}],27:[function(e,t,n){"use strict";function i(e){if(null===e)return!0;var t,n=e;for(t in n)if(a.call(n,t)&&null!==n[t])return!1;return!0}function r(e){return null!==e?e:{}}var o=e("../type"),a=Object.prototype.hasOwnProperty;t.exports=new o("tag:yaml.org,2002:set",{kind:"mapping",resolve:i,construct:r})},{"../type":13}],28:[function(e,t,n){"use strict";var i=e("../type");t.exports=new i("tag:yaml.org,2002:str",{kind:"scalar",construct:function(e){return null!==e?e:""}})},{"../type":13}],29:[function(e,t,n){"use strict";function i(e){return null===e?!1:null===s.exec(e)?!1:!0}function r(e){var t,n,i,r,o,a,c,u,l,p,f=0,h=null;if(t=s.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],a=+t[5],c=+t[6],t[7]){for(f=t[7].slice(0,3);f.length<3;)f+="0";f=+f}return t[9]&&(u=+t[10],l=+(t[11]||0),h=6e4*(60*u+l),"-"===t[9]&&(h=-h)),p=new Date(Date.UTC(n,i,r,o,a,c,f)),h&&p.setTime(p.getTime()-h),p}function o(e){return e.toISOString()}var a=e("../type"),s=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 a("tag:yaml.org,2002:timestamp",{kind:"scalar",resolve:i,construct:r,instanceOf:Date,represent:o})},{"../type":13}],30:[function(e,t,n){},{}],"/":[function(e,t,n){"use strict";var i=e("./lib/js-yaml.js");t.exports=i},{"./lib/js-yaml.js":1}]},{},[])("/")}); |
@@ -5,3 +5,3 @@ 'use strict'; | ||
function isNothing(subject) { | ||
return (typeof subject === 'undefined') || (null === subject); | ||
return (typeof subject === 'undefined') || (subject === null); | ||
} | ||
@@ -11,3 +11,3 @@ | ||
function isObject(subject) { | ||
return (typeof subject === 'object') && (null !== subject); | ||
return (typeof subject === 'object') && (subject !== null); | ||
} | ||
@@ -17,7 +17,5 @@ | ||
function toArray(sequence) { | ||
if (Array.isArray(sequence)) { | ||
return sequence; | ||
} else if (isNothing(sequence)) { | ||
return []; | ||
} | ||
if (Array.isArray(sequence)) return sequence; | ||
else if (isNothing(sequence)) return []; | ||
return [ sequence ]; | ||
@@ -55,3 +53,3 @@ } | ||
function isNegativeZero(number) { | ||
return (0 === number) && (Number.NEGATIVE_INFINITY === 1 / number); | ||
return (number === 0) && (Number.NEGATIVE_INFINITY === 1 / number); | ||
} | ||
@@ -58,0 +56,0 @@ |
@@ -63,5 +63,3 @@ 'use strict'; | ||
if (null === map) { | ||
return {}; | ||
} | ||
if (map === null) return {}; | ||
@@ -75,3 +73,3 @@ result = {}; | ||
if ('!!' === tag.slice(0, 2)) { | ||
if (tag.slice(0, 2) === '!!') { | ||
tag = 'tag:yaml.org,2002:' + tag.slice(2); | ||
@@ -150,5 +148,5 @@ } | ||
} | ||
if (line.length && line !== '\n') { | ||
result += ind; | ||
} | ||
if (line.length && line !== '\n') result += ind; | ||
result += line; | ||
@@ -222,3 +220,3 @@ } | ||
if (0 === object.length) { | ||
if (object.length === 0) { | ||
state.dump = "''"; | ||
@@ -228,3 +226,3 @@ return; | ||
if (-1 !== DEPRECATED_BOOLEANS_SYNTAX.indexOf(object)) { | ||
if (DEPRECATED_BOOLEANS_SYNTAX.indexOf(object) !== -1) { | ||
state.dump = "'" + object + "'"; | ||
@@ -251,5 +249,4 @@ return; | ||
if (spaceWrap || (state.flowLevel > -1 && state.flowLevel <= level)) { | ||
if (spaceWrap) { | ||
simple = false; | ||
} | ||
if (spaceWrap) simple = false; | ||
folded = false; | ||
@@ -271,14 +268,10 @@ literal = false; | ||
max = state.lineWidth; | ||
if (max === -1) { | ||
// Replace -1 with biggest ingeger number according to | ||
// http://ecma262-5.com/ELS5_HTML.htm#Section_8.5 | ||
max = 9007199254740991; | ||
} | ||
if (indent < 40) { | ||
max -= indent; | ||
} else { | ||
max = 40; | ||
} | ||
// Replace -1 with biggest ingeger number according to | ||
// http://ecma262-5.com/ELS5_HTML.htm#Section_8.5 | ||
if (max === -1) max = 9007199254740991; | ||
if (indent < 40) max -= indent; | ||
else max = 40; | ||
for (position = 0; position < object.length; position++) { | ||
@@ -326,11 +319,7 @@ character = object.charCodeAt(position); | ||
linePosition = position; | ||
if (lineLength > longestLine) { | ||
longestLine = lineLength; | ||
} | ||
if (lineLength > longestLine) longestLine = lineLength; | ||
} | ||
} | ||
if (character !== CHAR_DOUBLE_QUOTE) { | ||
single = false; | ||
} | ||
if (character !== CHAR_DOUBLE_QUOTE) single = false; | ||
@@ -341,5 +330,3 @@ double.takeUpTo(position); | ||
if (simple && testImplicitResolving(state, object)) { | ||
simple = false; | ||
} | ||
if (simple && testImplicitResolving(state, object)) simple = false; | ||
@@ -356,7 +343,4 @@ modifier = ''; | ||
if (trailingLineBreaks === 0) { | ||
modifier = '-'; | ||
} else if (trailingLineBreaks === 2) { | ||
modifier = '+'; | ||
} | ||
if (trailingLineBreaks === 0) modifier = '-'; | ||
else if (trailingLineBreaks === 2) modifier = '+'; | ||
} | ||
@@ -370,5 +354,3 @@ | ||
// We may still want to do a fold, though, if it's a super long line. | ||
if (!sawLineFeed) { | ||
literal = false; | ||
} | ||
if (!sawLineFeed) literal = false; | ||
@@ -383,5 +365,3 @@ if (simple) { | ||
} else if (literal) { | ||
if (!modifier) { | ||
object = object.replace(/\n$/, ''); | ||
} | ||
if (!modifier) object = object.replace(/\n$/, ''); | ||
state.dump = '|' + modifier + '\n' + indentString(object, indent); | ||
@@ -424,11 +404,8 @@ } else if (double) { | ||
if (newLine > length || newLine === -1) { | ||
if (result) { | ||
result += '\n\n'; | ||
} | ||
if (result) result += '\n\n'; | ||
result += foldLine(object.slice(position, length), max); | ||
position = length; | ||
} else { | ||
if (result) { | ||
result += '\n\n'; | ||
} | ||
if (result) result += '\n\n'; | ||
result += foldLine(object.slice(position, newLine), max); | ||
@@ -438,6 +415,5 @@ position = newLine + 1; | ||
} | ||
if (trailing && trailing[0] !== '\n') { | ||
result += trailing[0]; | ||
} | ||
if (trailing && trailing[0] !== '\n') result += trailing[0]; | ||
return result; | ||
@@ -447,5 +423,3 @@ } | ||
function foldLine(line, max) { | ||
if (line === '') { | ||
return line; | ||
} | ||
if (line === '') return line; | ||
@@ -468,11 +442,6 @@ var foldRe = /[^\s] [^\s]/g, | ||
if (index - foldStart > max) { | ||
if (prevMatch !== foldStart) { | ||
foldEnd = prevMatch; | ||
} else { | ||
foldEnd = index; | ||
} | ||
if (prevMatch !== foldStart) foldEnd = prevMatch; | ||
else foldEnd = index; | ||
if (result) { | ||
result += '\n'; | ||
} | ||
if (result) result += '\n'; | ||
folded = line.slice(foldStart, foldEnd); | ||
@@ -486,5 +455,3 @@ result += folded; | ||
if (result) { | ||
result += '\n'; | ||
} | ||
if (result) result += '\n'; | ||
@@ -530,3 +497,3 @@ // if we end up with one last word at the end, then the last bit might | ||
return !((0x00020 <= character && character <= 0x00007E) || | ||
(0x00085 === character) || | ||
(character === 0x00085) || | ||
(0x000A0 <= character && character <= 0x00D7FF) || | ||
@@ -546,5 +513,3 @@ (0x0E000 <= character && character <= 0x00FFFD) || | ||
if (writeNode(state, level, object[index], false, false)) { | ||
if (0 !== index) { | ||
_result += ', '; | ||
} | ||
if (index !== 0) _result += ', '; | ||
_result += state.dump; | ||
@@ -567,3 +532,3 @@ } | ||
if (writeNode(state, level + 1, object[index], true, true)) { | ||
if (!compact || 0 !== index) { | ||
if (!compact || index !== 0) { | ||
_result += generateNextLine(state, level); | ||
@@ -592,5 +557,3 @@ } | ||
if (0 !== index) { | ||
pairBuffer += ', '; | ||
} | ||
if (index !== 0) pairBuffer += ', '; | ||
@@ -604,5 +567,3 @@ objectKey = objectKeyList[index]; | ||
if (state.dump.length > 1024) { | ||
pairBuffer += '? '; | ||
} | ||
if (state.dump.length > 1024) pairBuffer += '? '; | ||
@@ -651,3 +612,3 @@ pairBuffer += state.dump + ': '; | ||
if (!compact || 0 !== index) { | ||
if (!compact || index !== 0) { | ||
pairBuffer += generateNextLine(state, level); | ||
@@ -663,3 +624,3 @@ } | ||
explicitPair = (null !== state.tag && '?' !== state.tag) || | ||
explicitPair = (state.tag !== null && state.tag !== '?') || | ||
(state.dump && state.dump.length > 1024); | ||
@@ -710,3 +671,3 @@ | ||
if ((type.instanceOf || type.predicate) && | ||
(!type.instanceOf || (('object' === typeof object) && (object instanceof type.instanceOf))) && | ||
(!type.instanceOf || ((typeof object === 'object') && (object instanceof type.instanceOf))) && | ||
(!type.predicate || type.predicate(object))) { | ||
@@ -719,3 +680,3 @@ | ||
if ('[object Function]' === _toString.call(type.represent)) { | ||
if (_toString.call(type.represent) === '[object Function]') { | ||
_result = type.represent(object, style); | ||
@@ -752,6 +713,6 @@ } else if (_hasOwnProperty.call(type.represent, style)) { | ||
if (block) { | ||
block = (0 > state.flowLevel || state.flowLevel > level); | ||
block = (state.flowLevel < 0 || state.flowLevel > level); | ||
} | ||
var objectOrArray = '[object Object]' === type || '[object Array]' === type, | ||
var objectOrArray = type === '[object Object]' || type === '[object Array]', | ||
duplicateIndex, | ||
@@ -765,3 +726,3 @@ duplicate; | ||
if ((null !== state.tag && '?' !== state.tag) || duplicate || (2 !== state.indent && level > 0)) { | ||
if ((state.tag !== null && state.tag !== '?') || duplicate || (state.indent !== 2 && level > 0)) { | ||
compact = false; | ||
@@ -776,4 +737,4 @@ } | ||
} | ||
if ('[object Object]' === type) { | ||
if (block && (0 !== Object.keys(state.dump).length)) { | ||
if (type === '[object Object]') { | ||
if (block && (Object.keys(state.dump).length !== 0)) { | ||
writeBlockMapping(state, level, state.dump, compact); | ||
@@ -789,4 +750,4 @@ if (duplicate) { | ||
} | ||
} else if ('[object Array]' === type) { | ||
if (block && (0 !== state.dump.length)) { | ||
} else if (type === '[object Array]') { | ||
if (block && (state.dump.length !== 0)) { | ||
writeBlockSequence(state, level, state.dump, compact); | ||
@@ -802,14 +763,12 @@ if (duplicate) { | ||
} | ||
} else if ('[object String]' === type) { | ||
if ('?' !== state.tag) { | ||
} else if (type === '[object String]') { | ||
if (state.tag !== '?') { | ||
writeScalar(state, state.dump, level, iskey); | ||
} | ||
} else { | ||
if (state.skipInvalid) { | ||
return false; | ||
} | ||
if (state.skipInvalid) return false; | ||
throw new YAMLException('unacceptable kind of an object to dump ' + type); | ||
} | ||
if (null !== state.tag && '?' !== state.tag) { | ||
if (state.tag !== null && state.tag !== '?') { | ||
state.dump = '!<' + state.tag + '> ' + state.dump; | ||
@@ -841,6 +800,6 @@ } | ||
if (null !== object && 'object' === typeof object) { | ||
if (object !== null && typeof object === 'object') { | ||
index = objects.indexOf(object); | ||
if (-1 !== index) { | ||
if (-1 === duplicatesIndexes.indexOf(index)) { | ||
if (index !== -1) { | ||
if (duplicatesIndexes.indexOf(index) === -1) { | ||
duplicatesIndexes.push(index); | ||
@@ -871,9 +830,6 @@ } | ||
if (!state.noRefs) { | ||
getDuplicateReferences(input, state); | ||
} | ||
if (!state.noRefs) getDuplicateReferences(input, state); | ||
if (writeNode(state, 0, input, true, true)) { | ||
return state.dump + '\n'; | ||
} | ||
if (writeNode(state, 0, input, true, true)) return state.dump + '\n'; | ||
return ''; | ||
@@ -880,0 +836,0 @@ } |
@@ -49,7 +49,7 @@ 'use strict'; | ||
function is_FLOW_INDICATOR(c) { | ||
return 0x2C/* , */ === c || | ||
0x5B/* [ */ === c || | ||
0x5D/* ] */ === c || | ||
0x7B/* { */ === c || | ||
0x7D/* } */ === c; | ||
return c === 0x2C/* , */ || | ||
c === 0x5B/* [ */ || | ||
c === 0x5D/* ] */ || | ||
c === 0x7B/* { */ || | ||
c === 0x7D/* } */; | ||
} | ||
@@ -136,2 +136,3 @@ | ||
this.json = options['json'] || false; | ||
this.listener = options['listener'] || null; | ||
@@ -183,58 +184,58 @@ this.implicitTypes = this.schema.compiledImplicit; | ||
var match, major, minor; | ||
var match, major, minor; | ||
if (null !== state.version) { | ||
throwError(state, 'duplication of %YAML directive'); | ||
} | ||
if (state.version !== null) { | ||
throwError(state, 'duplication of %YAML directive'); | ||
} | ||
if (1 !== args.length) { | ||
throwError(state, 'YAML directive accepts exactly one argument'); | ||
} | ||
if (args.length !== 1) { | ||
throwError(state, 'YAML directive accepts exactly one argument'); | ||
} | ||
match = /^([0-9]+)\.([0-9]+)$/.exec(args[0]); | ||
match = /^([0-9]+)\.([0-9]+)$/.exec(args[0]); | ||
if (null === match) { | ||
throwError(state, 'ill-formed argument of the YAML directive'); | ||
} | ||
if (match === null) { | ||
throwError(state, 'ill-formed argument of the YAML directive'); | ||
} | ||
major = parseInt(match[1], 10); | ||
minor = parseInt(match[2], 10); | ||
major = parseInt(match[1], 10); | ||
minor = parseInt(match[2], 10); | ||
if (1 !== major) { | ||
throwError(state, 'unacceptable YAML version of the document'); | ||
} | ||
if (major !== 1) { | ||
throwError(state, 'unacceptable YAML version of the document'); | ||
} | ||
state.version = args[0]; | ||
state.checkLineBreaks = (minor < 2); | ||
state.version = args[0]; | ||
state.checkLineBreaks = (minor < 2); | ||
if (1 !== minor && 2 !== minor) { | ||
throwWarning(state, 'unsupported YAML version of the document'); | ||
} | ||
}, | ||
if (minor !== 1 && minor !== 2) { | ||
throwWarning(state, 'unsupported YAML version of the document'); | ||
} | ||
}, | ||
TAG: function handleTagDirective(state, name, args) { | ||
var handle, prefix; | ||
var handle, prefix; | ||
if (2 !== args.length) { | ||
throwError(state, 'TAG directive accepts exactly two arguments'); | ||
} | ||
if (args.length !== 2) { | ||
throwError(state, 'TAG directive accepts exactly two arguments'); | ||
} | ||
handle = args[0]; | ||
prefix = args[1]; | ||
handle = args[0]; | ||
prefix = args[1]; | ||
if (!PATTERN_TAG_HANDLE.test(handle)) { | ||
throwError(state, 'ill-formed tag handle (first argument) of the TAG directive'); | ||
} | ||
if (!PATTERN_TAG_HANDLE.test(handle)) { | ||
throwError(state, 'ill-formed tag handle (first argument) of the TAG directive'); | ||
} | ||
if (_hasOwnProperty.call(state.tagMap, handle)) { | ||
throwError(state, 'there is a previously declared suffix for "' + handle + '" tag handle'); | ||
} | ||
if (_hasOwnProperty.call(state.tagMap, handle)) { | ||
throwError(state, 'there is a previously declared suffix for "' + handle + '" tag handle'); | ||
} | ||
if (!PATTERN_TAG_URI.test(prefix)) { | ||
throwError(state, 'ill-formed tag prefix (second argument) of the TAG directive'); | ||
} | ||
if (!PATTERN_TAG_URI.test(prefix)) { | ||
throwError(state, 'ill-formed tag prefix (second argument) of the TAG directive'); | ||
} | ||
state.tagMap[handle] = prefix; | ||
} | ||
state.tagMap[handle] = prefix; | ||
} | ||
}; | ||
@@ -254,4 +255,4 @@ | ||
_character = _result.charCodeAt(_position); | ||
if (!(0x09 === _character || | ||
0x20 <= _character && _character <= 0x10FFFF)) { | ||
if (!(_character === 0x09 || | ||
(0x20 <= _character && _character <= 0x10FFFF))) { | ||
throwError(state, 'expected valid JSON character'); | ||
@@ -292,7 +293,7 @@ } | ||
if (null === _result) { | ||
if (_result === null) { | ||
_result = {}; | ||
} | ||
if ('tag:yaml.org,2002:merge' === keyTag) { | ||
if (keyTag === 'tag:yaml.org,2002:merge') { | ||
if (Array.isArray(valueNode)) { | ||
@@ -323,7 +324,7 @@ for (index = 0, quantity = valueNode.length; index < quantity; index += 1) { | ||
if (0x0A/* LF */ === ch) { | ||
if (ch === 0x0A/* LF */) { | ||
state.position++; | ||
} else if (0x0D/* CR */ === ch) { | ||
} else if (ch === 0x0D/* CR */) { | ||
state.position++; | ||
if (0x0A/* LF */ === state.input.charCodeAt(state.position)) { | ||
if (state.input.charCodeAt(state.position) === 0x0A/* LF */) { | ||
state.position++; | ||
@@ -343,3 +344,3 @@ } | ||
while (0 !== ch) { | ||
while (ch !== 0) { | ||
while (is_WHITE_SPACE(ch)) { | ||
@@ -349,6 +350,6 @@ ch = state.input.charCodeAt(++state.position); | ||
if (allowComments && 0x23/* # */ === ch) { | ||
if (allowComments && ch === 0x23/* # */) { | ||
do { | ||
ch = state.input.charCodeAt(++state.position); | ||
} while (ch !== 0x0A/* LF */ && ch !== 0x0D/* CR */ && 0 !== ch); | ||
} while (ch !== 0x0A/* LF */ && ch !== 0x0D/* CR */ && ch !== 0); | ||
} | ||
@@ -363,3 +364,3 @@ | ||
while (0x20/* Space */ === ch) { | ||
while (ch === 0x20/* Space */) { | ||
state.lineIndent++; | ||
@@ -373,3 +374,3 @@ ch = state.input.charCodeAt(++state.position); | ||
if (-1 !== checkIndent && 0 !== lineBreaks && state.lineIndent < checkIndent) { | ||
if (checkIndent !== -1 && lineBreaks !== 0 && state.lineIndent < checkIndent) { | ||
throwWarning(state, 'deficient indentation'); | ||
@@ -389,5 +390,5 @@ } | ||
// in parent on each call, for efficiency. No needs to test here again. | ||
if ((0x2D/* - */ === ch || 0x2E/* . */ === ch) && | ||
state.input.charCodeAt(_position + 1) === ch && | ||
state.input.charCodeAt(_position + 2) === ch) { | ||
if ((ch === 0x2D/* - */ || ch === 0x2E/* . */) && | ||
ch === state.input.charCodeAt(_position + 1) && | ||
ch === state.input.charCodeAt(_position + 2)) { | ||
@@ -407,3 +408,3 @@ _position += 3; | ||
function writeFoldedLines(state, count) { | ||
if (1 === count) { | ||
if (count === 1) { | ||
state.result += ' '; | ||
@@ -431,19 +432,19 @@ } else if (count > 1) { | ||
if (is_WS_OR_EOL(ch) || | ||
is_FLOW_INDICATOR(ch) || | ||
0x23/* # */ === ch || | ||
0x26/* & */ === ch || | ||
0x2A/* * */ === ch || | ||
0x21/* ! */ === ch || | ||
0x7C/* | */ === ch || | ||
0x3E/* > */ === ch || | ||
0x27/* ' */ === ch || | ||
0x22/* " */ === ch || | ||
0x25/* % */ === ch || | ||
0x40/* @ */ === ch || | ||
0x60/* ` */ === ch) { | ||
if (is_WS_OR_EOL(ch) || | ||
is_FLOW_INDICATOR(ch) || | ||
ch === 0x23/* # */ || | ||
ch === 0x26/* & */ || | ||
ch === 0x2A/* * */ || | ||
ch === 0x21/* ! */ || | ||
ch === 0x7C/* | */ || | ||
ch === 0x3E/* > */ || | ||
ch === 0x27/* ' */ || | ||
ch === 0x22/* " */ || | ||
ch === 0x25/* % */ || | ||
ch === 0x40/* @ */ || | ||
ch === 0x60/* ` */) { | ||
return false; | ||
} | ||
if (0x3F/* ? */ === ch || 0x2D/* - */ === ch) { | ||
if (ch === 0x3F/* ? */ || ch === 0x2D/* - */) { | ||
following = state.input.charCodeAt(state.position + 1); | ||
@@ -462,4 +463,4 @@ | ||
while (0 !== ch) { | ||
if (0x3A/* : */ === ch) { | ||
while (ch !== 0) { | ||
if (ch === 0x3A/* : */) { | ||
following = state.input.charCodeAt(state.position + 1); | ||
@@ -472,3 +473,3 @@ | ||
} else if (0x23/* # */ === ch) { | ||
} else if (ch === 0x23/* # */) { | ||
preceding = state.input.charCodeAt(state.position - 1); | ||
@@ -534,3 +535,3 @@ | ||
if (0x27/* ' */ !== ch) { | ||
if (ch !== 0x27/* ' */) { | ||
return false; | ||
@@ -544,8 +545,8 @@ } | ||
while (0 !== (ch = state.input.charCodeAt(state.position))) { | ||
if (0x27/* ' */ === ch) { | ||
while ((ch = state.input.charCodeAt(state.position)) !== 0) { | ||
if (ch === 0x27/* ' */) { | ||
captureSegment(state, captureStart, state.position, true); | ||
ch = state.input.charCodeAt(++state.position); | ||
if (0x27/* ' */ === ch) { | ||
if (ch === 0x27/* ' */) { | ||
captureStart = captureEnd = state.position; | ||
@@ -584,3 +585,3 @@ state.position++; | ||
if (0x22/* " */ !== ch) { | ||
if (ch !== 0x22/* " */) { | ||
return false; | ||
@@ -594,4 +595,4 @@ } | ||
while (0 !== (ch = state.input.charCodeAt(state.position))) { | ||
if (0x22/* " */ === ch) { | ||
while ((ch = state.input.charCodeAt(state.position)) !== 0) { | ||
if (ch === 0x22/* " */) { | ||
captureSegment(state, captureStart, state.position, true); | ||
@@ -601,3 +602,3 @@ state.position++; | ||
} else if (0x5C/* \ */ === ch) { | ||
} else if (ch === 0x5C/* \ */) { | ||
captureSegment(state, captureStart, state.position, true); | ||
@@ -687,3 +688,3 @@ ch = state.input.charCodeAt(++state.position); | ||
if (null !== state.anchor) { | ||
if (state.anchor !== null) { | ||
state.anchorMap[state.anchor] = _result; | ||
@@ -694,3 +695,3 @@ } | ||
while (0 !== ch) { | ||
while (ch !== 0) { | ||
skipSeparationSpace(state, true, nodeIndent); | ||
@@ -714,3 +715,3 @@ | ||
if (0x3F/* ? */ === ch) { | ||
if (ch === 0x3F/* ? */) { | ||
following = state.input.charCodeAt(state.position + 1); | ||
@@ -733,3 +734,3 @@ | ||
if ((isExplicitPair || state.line === _line) && 0x3A/* : */ === ch) { | ||
if ((isExplicitPair || state.line === _line) && ch === 0x3A/* : */) { | ||
isPair = true; | ||
@@ -754,3 +755,3 @@ ch = state.input.charCodeAt(++state.position); | ||
if (0x2C/* , */ === ch) { | ||
if (ch === 0x2C/* , */) { | ||
readNext = true; | ||
@@ -790,8 +791,8 @@ ch = state.input.charCodeAt(++state.position); | ||
while (0 !== ch) { | ||
while (ch !== 0) { | ||
ch = state.input.charCodeAt(++state.position); | ||
if (0x2B/* + */ === ch || 0x2D/* - */ === ch) { | ||
if (ch === 0x2B/* + */ || ch === 0x2D/* - */) { | ||
if (CHOMPING_CLIP === chomping) { | ||
chomping = (0x2B/* + */ === ch) ? CHOMPING_KEEP : CHOMPING_STRIP; | ||
chomping = (ch === 0x2B/* + */) ? CHOMPING_KEEP : CHOMPING_STRIP; | ||
} else { | ||
@@ -820,9 +821,9 @@ throwError(state, 'repeat of a chomping mode identifier'); | ||
if (0x23/* # */ === ch) { | ||
if (ch === 0x23/* # */) { | ||
do { ch = state.input.charCodeAt(++state.position); } | ||
while (!is_EOL(ch) && (0 !== ch)); | ||
while (!is_EOL(ch) && (ch !== 0)); | ||
} | ||
} | ||
while (0 !== ch) { | ||
while (ch !== 0) { | ||
readLineBreak(state); | ||
@@ -834,3 +835,3 @@ state.lineIndent = 0; | ||
while ((!detectedIndent || state.lineIndent < textIndent) && | ||
(0x20/* Space */ === ch)) { | ||
(ch === 0x20/* Space */)) { | ||
state.lineIndent++; | ||
@@ -879,3 +880,3 @@ ch = state.input.charCodeAt(++state.position); | ||
// Just one line break - perceive as the same line. | ||
} else if (0 === emptyLines) { | ||
} else if (emptyLines === 0) { | ||
if (detectedIndent) { // i.e. only if we have already read some scalar content. | ||
@@ -903,3 +904,3 @@ state.result += ' '; | ||
while (!is_EOL(ch) && (0 !== ch)) { | ||
while (!is_EOL(ch) && (ch !== 0)) { | ||
ch = state.input.charCodeAt(++state.position); | ||
@@ -923,3 +924,3 @@ } | ||
if (null !== state.anchor) { | ||
if (state.anchor !== null) { | ||
state.anchorMap[state.anchor] = _result; | ||
@@ -930,5 +931,5 @@ } | ||
while (0 !== ch) { | ||
while (ch !== 0) { | ||
if (0x2D/* - */ !== ch) { | ||
if (ch !== 0x2D/* - */) { | ||
break; | ||
@@ -961,3 +962,3 @@ } | ||
if ((state.line === _line || state.lineIndent > nodeIndent) && (0 !== ch)) { | ||
if ((state.line === _line || state.lineIndent > nodeIndent) && (ch !== 0)) { | ||
throwError(state, 'bad indentation of a sequence entry'); | ||
@@ -994,3 +995,3 @@ } else if (state.lineIndent < nodeIndent) { | ||
if (null !== state.anchor) { | ||
if (state.anchor !== null) { | ||
state.anchorMap[state.anchor] = _result; | ||
@@ -1001,3 +1002,3 @@ } | ||
while (0 !== ch) { | ||
while (ch !== 0) { | ||
following = state.input.charCodeAt(state.position + 1); | ||
@@ -1010,5 +1011,5 @@ _line = state.line; // Save the current line. | ||
// | ||
if ((0x3F/* ? */ === ch || 0x3A/* : */ === ch) && is_WS_OR_EOL(following)) { | ||
if ((ch === 0x3F/* ? */ || ch === 0x3A/* : */) && is_WS_OR_EOL(following)) { | ||
if (0x3F/* ? */ === ch) { | ||
if (ch === 0x3F/* ? */) { | ||
if (atExplicitKey) { | ||
@@ -1047,3 +1048,3 @@ storeMappingPair(state, _result, overridableKeys, keyTag, keyNode, null); | ||
if (0x3A/* : */ === ch) { | ||
if (ch === 0x3A/* : */) { | ||
ch = state.input.charCodeAt(++state.position); | ||
@@ -1109,3 +1110,3 @@ | ||
if (state.lineIndent > nodeIndent && (0 !== ch)) { | ||
if (state.lineIndent > nodeIndent && (ch !== 0)) { | ||
throwError(state, 'bad indentation of a mapping entry'); | ||
@@ -1147,7 +1148,5 @@ } else if (state.lineIndent < nodeIndent) { | ||
if (0x21/* ! */ !== ch) { | ||
return false; | ||
} | ||
if (ch !== 0x21/* ! */) return false; | ||
if (null !== state.tag) { | ||
if (state.tag !== null) { | ||
throwError(state, 'duplication of a tag property'); | ||
@@ -1158,7 +1157,7 @@ } | ||
if (0x3C/* < */ === ch) { | ||
if (ch === 0x3C/* < */) { | ||
isVerbatim = true; | ||
ch = state.input.charCodeAt(++state.position); | ||
} else if (0x21/* ! */ === ch) { | ||
} else if (ch === 0x21/* ! */) { | ||
isNamed = true; | ||
@@ -1176,3 +1175,3 @@ tagHandle = '!!'; | ||
do { ch = state.input.charCodeAt(++state.position); } | ||
while (0 !== ch && 0x3E/* > */ !== ch); | ||
while (ch !== 0 && ch !== 0x3E/* > */); | ||
@@ -1186,5 +1185,5 @@ if (state.position < state.length) { | ||
} else { | ||
while (0 !== ch && !is_WS_OR_EOL(ch)) { | ||
while (ch !== 0 && !is_WS_OR_EOL(ch)) { | ||
if (0x21/* ! */ === ch) { | ||
if (ch === 0x21/* ! */) { | ||
if (!isNamed) { | ||
@@ -1224,6 +1223,6 @@ tagHandle = state.input.slice(_position - 1, state.position + 1); | ||
} else if ('!' === tagHandle) { | ||
} else if (tagHandle === '!') { | ||
state.tag = '!' + tagName; | ||
} else if ('!!' === tagHandle) { | ||
} else if (tagHandle === '!!') { | ||
state.tag = 'tag:yaml.org,2002:' + tagName; | ||
@@ -1244,7 +1243,5 @@ | ||
if (0x26/* & */ !== ch) { | ||
return false; | ||
} | ||
if (ch !== 0x26/* & */) return false; | ||
if (null !== state.anchor) { | ||
if (state.anchor !== null) { | ||
throwError(state, 'duplication of an anchor property'); | ||
@@ -1256,3 +1253,3 @@ } | ||
while (0 !== ch && !is_WS_OR_EOL(ch) && !is_FLOW_INDICATOR(ch)) { | ||
while (ch !== 0 && !is_WS_OR_EOL(ch) && !is_FLOW_INDICATOR(ch)) { | ||
ch = state.input.charCodeAt(++state.position); | ||
@@ -1275,5 +1272,3 @@ } | ||
if (0x2A/* * */ !== ch) { | ||
return false; | ||
} | ||
if (ch !== 0x2A/* * */) return false; | ||
@@ -1283,3 +1278,3 @@ ch = state.input.charCodeAt(++state.position); | ||
while (0 !== ch && !is_WS_OR_EOL(ch) && !is_FLOW_INDICATOR(ch)) { | ||
while (ch !== 0 && !is_WS_OR_EOL(ch) && !is_FLOW_INDICATOR(ch)) { | ||
ch = state.input.charCodeAt(++state.position); | ||
@@ -1316,2 +1311,6 @@ } | ||
if (state.listener !== null) { | ||
state.listener('open', state); | ||
} | ||
state.tag = null; | ||
@@ -1340,3 +1339,3 @@ state.anchor = null; | ||
if (1 === indentStatus) { | ||
if (indentStatus === 1) { | ||
while (readTagProperty(state) || readAnchorProperty(state)) { | ||
@@ -1364,3 +1363,3 @@ if (skipSeparationSpace(state, true, -1)) { | ||
if (1 === indentStatus || CONTEXT_BLOCK_OUT === nodeContext) { | ||
if (indentStatus === 1 || CONTEXT_BLOCK_OUT === nodeContext) { | ||
if (CONTEXT_FLOW_IN === nodeContext || CONTEXT_FLOW_OUT === nodeContext) { | ||
@@ -1374,3 +1373,3 @@ flowIndent = parentIndent; | ||
if (1 === indentStatus) { | ||
if (indentStatus === 1) { | ||
if (allowBlockCollections && | ||
@@ -1390,3 +1389,3 @@ (readBlockSequence(state, blockIndent) || | ||
if (null !== state.tag || null !== state.anchor) { | ||
if (state.tag !== null || state.anchor !== null) { | ||
throwError(state, 'alias node should not have any properties'); | ||
@@ -1398,3 +1397,3 @@ } | ||
if (null === state.tag) { | ||
if (state.tag === null) { | ||
state.tag = '?'; | ||
@@ -1404,7 +1403,7 @@ } | ||
if (null !== state.anchor) { | ||
if (state.anchor !== null) { | ||
state.anchorMap[state.anchor] = state.result; | ||
} | ||
} | ||
} else if (0 === indentStatus) { | ||
} else if (indentStatus === 0) { | ||
// Special case: block sequences are allowed to have same indentation level as the parent. | ||
@@ -1416,4 +1415,4 @@ // http://www.yaml.org/spec/1.2/spec.html#id2799784 | ||
if (null !== state.tag && '!' !== state.tag) { | ||
if ('?' === state.tag) { | ||
if (state.tag !== null && state.tag !== '!') { | ||
if (state.tag === '?') { | ||
for (typeIndex = 0, typeQuantity = state.implicitTypes.length; | ||
@@ -1431,3 +1430,3 @@ typeIndex < typeQuantity; | ||
state.tag = type.tag; | ||
if (null !== state.anchor) { | ||
if (state.anchor !== null) { | ||
state.anchorMap[state.anchor] = state.result; | ||
@@ -1441,3 +1440,3 @@ } | ||
if (null !== state.result && type.kind !== state.kind) { | ||
if (state.result !== null && type.kind !== state.kind) { | ||
throwError(state, 'unacceptable node kind for !<' + state.tag + '> tag; it should be "' + type.kind + '", not "' + state.kind + '"'); | ||
@@ -1450,3 +1449,3 @@ } | ||
state.result = type.construct(state.result); | ||
if (null !== state.anchor) { | ||
if (state.anchor !== null) { | ||
state.anchorMap[state.anchor] = state.result; | ||
@@ -1460,3 +1459,6 @@ } | ||
return null !== state.tag || null !== state.anchor || hasContent; | ||
if (state.listener !== null) { | ||
state.listener('close', state); | ||
} | ||
return state.tag !== null || state.anchor !== null || hasContent; | ||
} | ||
@@ -1477,3 +1479,3 @@ | ||
while (0 !== (ch = state.input.charCodeAt(state.position))) { | ||
while ((ch = state.input.charCodeAt(state.position)) !== 0) { | ||
skipSeparationSpace(state, true, -1); | ||
@@ -1483,3 +1485,3 @@ | ||
if (state.lineIndent > 0 || 0x25/* % */ !== ch) { | ||
if (state.lineIndent > 0 || ch !== 0x25/* % */) { | ||
break; | ||
@@ -1492,3 +1494,3 @@ } | ||
while (0 !== ch && !is_WS_OR_EOL(ch)) { | ||
while (ch !== 0 && !is_WS_OR_EOL(ch)) { | ||
ch = state.input.charCodeAt(++state.position); | ||
@@ -1504,3 +1506,3 @@ } | ||
while (0 !== ch) { | ||
while (ch !== 0) { | ||
while (is_WHITE_SPACE(ch)) { | ||
@@ -1510,15 +1512,13 @@ ch = state.input.charCodeAt(++state.position); | ||
if (0x23/* # */ === ch) { | ||
if (ch === 0x23/* # */) { | ||
do { ch = state.input.charCodeAt(++state.position); } | ||
while (0 !== ch && !is_EOL(ch)); | ||
while (ch !== 0 && !is_EOL(ch)); | ||
break; | ||
} | ||
if (is_EOL(ch)) { | ||
break; | ||
} | ||
if (is_EOL(ch)) break; | ||
_position = state.position; | ||
while (0 !== ch && !is_WS_OR_EOL(ch)) { | ||
while (ch !== 0 && !is_WS_OR_EOL(ch)) { | ||
ch = state.input.charCodeAt(++state.position); | ||
@@ -1530,5 +1530,3 @@ } | ||
if (0 !== ch) { | ||
readLineBreak(state); | ||
} | ||
if (ch !== 0) readLineBreak(state); | ||
@@ -1544,6 +1542,6 @@ if (_hasOwnProperty.call(directiveHandlers, directiveName)) { | ||
if (0 === state.lineIndent && | ||
0x2D/* - */ === state.input.charCodeAt(state.position) && | ||
0x2D/* - */ === state.input.charCodeAt(state.position + 1) && | ||
0x2D/* - */ === state.input.charCodeAt(state.position + 2)) { | ||
if (state.lineIndent === 0 && | ||
state.input.charCodeAt(state.position) === 0x2D/* - */ && | ||
state.input.charCodeAt(state.position + 1) === 0x2D/* - */ && | ||
state.input.charCodeAt(state.position + 2) === 0x2D/* - */) { | ||
state.position += 3; | ||
@@ -1568,3 +1566,3 @@ skipSeparationSpace(state, true, -1); | ||
if (0x2E/* . */ === state.input.charCodeAt(state.position)) { | ||
if (state.input.charCodeAt(state.position) === 0x2E/* . */) { | ||
state.position += 3; | ||
@@ -1591,4 +1589,4 @@ skipSeparationSpace(state, true, -1); | ||
// Add tailing `\n` if not exists | ||
if (0x0A/* LF */ !== input.charCodeAt(input.length - 1) && | ||
0x0D/* CR */ !== input.charCodeAt(input.length - 1)) { | ||
if (input.charCodeAt(input.length - 1) !== 0x0A/* LF */ && | ||
input.charCodeAt(input.length - 1) !== 0x0D/* CR */) { | ||
input += '\n'; | ||
@@ -1608,3 +1606,3 @@ } | ||
while (0x20/* Space */ === state.input.charCodeAt(state.position)) { | ||
while (state.input.charCodeAt(state.position) === 0x20/* Space */) { | ||
state.lineIndent += 1; | ||
@@ -1634,6 +1632,6 @@ state.position += 1; | ||
if (0 === documents.length) { | ||
if (documents.length === 0) { | ||
/*eslint-disable no-undefined*/ | ||
return undefined; | ||
} else if (1 === documents.length) { | ||
} else if (documents.length === 1) { | ||
return documents[0]; | ||
@@ -1640,0 +1638,0 @@ } |
@@ -19,5 +19,3 @@ 'use strict'; | ||
if (!this.buffer) { | ||
return null; | ||
} | ||
if (!this.buffer) return null; | ||
@@ -30,3 +28,3 @@ indent = indent || 4; | ||
while (start > 0 && -1 === '\x00\r\n\x85\u2028\u2029'.indexOf(this.buffer.charAt(start - 1))) { | ||
while (start > 0 && '\x00\r\n\x85\u2028\u2029'.indexOf(this.buffer.charAt(start - 1)) === -1) { | ||
start -= 1; | ||
@@ -43,3 +41,3 @@ if (this.position - start > (maxLength / 2 - 1)) { | ||
while (end < this.buffer.length && -1 === '\x00\r\n\x85\u2028\u2029'.indexOf(this.buffer.charAt(end))) { | ||
while (end < this.buffer.length && '\x00\r\n\x85\u2028\u2029'.indexOf(this.buffer.charAt(end)) === -1) { | ||
end += 1; | ||
@@ -46,0 +44,0 @@ if (end - this.position > (maxLength / 2 - 1)) { |
@@ -28,3 +28,3 @@ 'use strict'; | ||
return result.filter(function (type, index) { | ||
return -1 === exclude.indexOf(index); | ||
return exclude.indexOf(index) === -1; | ||
}); | ||
@@ -55,3 +55,3 @@ } | ||
this.implicit.forEach(function (type) { | ||
if (type.loadKind && 'scalar' !== type.loadKind) { | ||
if (type.loadKind && type.loadKind !== 'scalar') { | ||
throw new YAMLException('There is a non-scalar type in the implicit list of a schema. Implicit resolving of such types is not supported.'); | ||
@@ -74,14 +74,14 @@ } | ||
switch (arguments.length) { | ||
case 1: | ||
schemas = Schema.DEFAULT; | ||
types = arguments[0]; | ||
break; | ||
case 1: | ||
schemas = Schema.DEFAULT; | ||
types = arguments[0]; | ||
break; | ||
case 2: | ||
schemas = arguments[0]; | ||
types = arguments[1]; | ||
break; | ||
case 2: | ||
schemas = arguments[0]; | ||
types = arguments[1]; | ||
break; | ||
default: | ||
throw new YAMLException('Wrong number of arguments for Schema.create function'); | ||
default: | ||
throw new YAMLException('Wrong number of arguments for Schema.create function'); | ||
} | ||
@@ -88,0 +88,0 @@ |
@@ -25,3 +25,3 @@ 'use strict'; | ||
if (null !== map) { | ||
if (map !== null) { | ||
Object.keys(map).forEach(function (style) { | ||
@@ -41,3 +41,3 @@ map[style].forEach(function (alias) { | ||
Object.keys(options).forEach(function (name) { | ||
if (-1 === TYPE_CONSTRUCTOR_OPTIONS.indexOf(name)) { | ||
if (TYPE_CONSTRUCTOR_OPTIONS.indexOf(name) === -1) { | ||
throw new YAMLException('Unknown option "' + name + '" is met in definition of "' + tag + '" YAML type.'); | ||
@@ -58,3 +58,3 @@ } | ||
if (-1 === YAML_NODE_KINDS.indexOf(this.kind)) { | ||
if (YAML_NODE_KINDS.indexOf(this.kind) === -1) { | ||
throw new YAMLException('Unknown kind "' + this.kind + '" is specified for "' + tag + '" YAML type.'); | ||
@@ -61,0 +61,0 @@ } |
@@ -16,5 +16,3 @@ 'use strict'; | ||
function resolveYamlBinary(data) { | ||
if (null === data) { | ||
return false; | ||
} | ||
if (data === null) return false; | ||
@@ -28,6 +26,6 @@ var code, idx, bitlen = 0, max = data.length, map = BASE64_MAP; | ||
// Skip CR/LF | ||
if (code > 64) { continue; } | ||
if (code > 64) continue; | ||
// Fail on illegal characters | ||
if (code < 0) { return false; } | ||
if (code < 0) return false; | ||
@@ -77,5 +75,3 @@ bitlen += 6; | ||
// Wrap into Buffer for NodeJS and leave Array for browser | ||
if (NodeBuffer) { | ||
return new NodeBuffer(result); | ||
} | ||
if (NodeBuffer) return new NodeBuffer(result); | ||
@@ -82,0 +78,0 @@ return result; |
@@ -6,5 +6,3 @@ 'use strict'; | ||
function resolveYamlBoolean(data) { | ||
if (null === data) { | ||
return false; | ||
} | ||
if (data === null) return false; | ||
@@ -24,3 +22,3 @@ var max = data.length; | ||
function isBoolean(object) { | ||
return '[object Boolean]' === Object.prototype.toString.call(object); | ||
return Object.prototype.toString.call(object) === '[object Boolean]'; | ||
} | ||
@@ -27,0 +25,0 @@ |
@@ -14,9 +14,6 @@ 'use strict'; | ||
function resolveYamlFloat(data) { | ||
if (null === data) { | ||
return false; | ||
} | ||
if (data === null) return false; | ||
if (!YAML_FLOAT_PATTERN.test(data)) { | ||
return false; | ||
} | ||
if (!YAML_FLOAT_PATTERN.test(data)) return false; | ||
return true; | ||
@@ -29,16 +26,16 @@ } | ||
value = data.replace(/_/g, '').toLowerCase(); | ||
sign = '-' === value[0] ? -1 : 1; | ||
sign = value[0] === '-' ? -1 : 1; | ||
digits = []; | ||
if (0 <= '+-'.indexOf(value[0])) { | ||
if ('+-'.indexOf(value[0]) >= 0) { | ||
value = value.slice(1); | ||
} | ||
if ('.inf' === value) { | ||
return (1 === sign) ? Number.POSITIVE_INFINITY : Number.NEGATIVE_INFINITY; | ||
if (value === '.inf') { | ||
return (sign === 1) ? Number.POSITIVE_INFINITY : Number.NEGATIVE_INFINITY; | ||
} else if ('.nan' === value) { | ||
} else if (value === '.nan') { | ||
return NaN; | ||
} else if (0 <= value.indexOf(':')) { | ||
} else if (value.indexOf(':') >= 0) { | ||
value.split(':').forEach(function (v) { | ||
@@ -70,26 +67,17 @@ digits.unshift(parseFloat(v, 10)); | ||
switch (style) { | ||
case 'lowercase': | ||
return '.nan'; | ||
case 'uppercase': | ||
return '.NAN'; | ||
case 'camelcase': | ||
return '.NaN'; | ||
case 'lowercase': return '.nan'; | ||
case 'uppercase': return '.NAN'; | ||
case 'camelcase': return '.NaN'; | ||
} | ||
} else if (Number.POSITIVE_INFINITY === object) { | ||
switch (style) { | ||
case 'lowercase': | ||
return '.inf'; | ||
case 'uppercase': | ||
return '.INF'; | ||
case 'camelcase': | ||
return '.Inf'; | ||
case 'lowercase': return '.inf'; | ||
case 'uppercase': return '.INF'; | ||
case 'camelcase': return '.Inf'; | ||
} | ||
} else if (Number.NEGATIVE_INFINITY === object) { | ||
switch (style) { | ||
case 'lowercase': | ||
return '-.inf'; | ||
case 'uppercase': | ||
return '-.INF'; | ||
case 'camelcase': | ||
return '-.Inf'; | ||
case 'lowercase': return '-.inf'; | ||
case 'uppercase': return '-.INF'; | ||
case 'camelcase': return '-.Inf'; | ||
} | ||
@@ -109,4 +97,4 @@ } else if (common.isNegativeZero(object)) { | ||
function isFloat(object) { | ||
return ('[object Number]' === Object.prototype.toString.call(object)) && | ||
(0 !== object % 1 || common.isNegativeZero(object)); | ||
return (Object.prototype.toString.call(object) === '[object Number]') && | ||
(object % 1 !== 0 || common.isNegativeZero(object)); | ||
} | ||
@@ -113,0 +101,0 @@ |
@@ -21,5 +21,3 @@ 'use strict'; | ||
function resolveYamlInteger(data) { | ||
if (null === data) { | ||
return false; | ||
} | ||
if (data === null) return false; | ||
@@ -31,3 +29,3 @@ var max = data.length, | ||
if (!max) { return false; } | ||
if (!max) return false; | ||
@@ -43,3 +41,3 @@ ch = data[index]; | ||
// 0 | ||
if (index + 1 === max) { return true; } | ||
if (index + 1 === max) return true; | ||
ch = data[++index]; | ||
@@ -55,6 +53,4 @@ | ||
ch = data[index]; | ||
if (ch === '_') { continue; } | ||
if (ch !== '0' && ch !== '1') { | ||
return false; | ||
} | ||
if (ch === '_') continue; | ||
if (ch !== '0' && ch !== '1') return false; | ||
hasDigits = true; | ||
@@ -72,6 +68,4 @@ } | ||
ch = data[index]; | ||
if (ch === '_') { continue; } | ||
if (!isHexCode(data.charCodeAt(index))) { | ||
return false; | ||
} | ||
if (ch === '_') continue; | ||
if (!isHexCode(data.charCodeAt(index))) return false; | ||
hasDigits = true; | ||
@@ -85,6 +79,4 @@ } | ||
ch = data[index]; | ||
if (ch === '_') { continue; } | ||
if (!isOctCode(data.charCodeAt(index))) { | ||
return false; | ||
} | ||
if (ch === '_') continue; | ||
if (!isOctCode(data.charCodeAt(index))) return false; | ||
hasDigits = true; | ||
@@ -99,4 +91,4 @@ } | ||
ch = data[index]; | ||
if (ch === '_') { continue; } | ||
if (ch === ':') { break; } | ||
if (ch === '_') continue; | ||
if (ch === ':') break; | ||
if (!isDecCode(data.charCodeAt(index))) { | ||
@@ -108,6 +100,6 @@ return false; | ||
if (!hasDigits) { return false; } | ||
if (!hasDigits) return false; | ||
// if !base60 - done; | ||
if (ch !== ':') { return true; } | ||
if (ch !== ':') return true; | ||
@@ -128,3 +120,3 @@ // base60 almost not used, no needs to optimize | ||
if (ch === '-' || ch === '+') { | ||
if (ch === '-') { sign = -1; } | ||
if (ch === '-') sign = -1; | ||
value = value.slice(1); | ||
@@ -134,15 +126,8 @@ ch = value[0]; | ||
if ('0' === value) { | ||
return 0; | ||
} | ||
if (value === '0') return 0; | ||
if (ch === '0') { | ||
if (value[1] === 'b') { | ||
return sign * parseInt(value.slice(2), 2); | ||
} | ||
if (value[1] === 'x') { | ||
return sign * parseInt(value, 16); | ||
} | ||
if (value[1] === 'b') return sign * parseInt(value.slice(2), 2); | ||
if (value[1] === 'x') return sign * parseInt(value, 16); | ||
return sign * parseInt(value, 8); | ||
} | ||
@@ -171,4 +156,4 @@ | ||
function isInteger(object) { | ||
return ('[object Number]' === Object.prototype.toString.call(object)) && | ||
(0 === object % 1 && !common.isNegativeZero(object)); | ||
return (Object.prototype.toString.call(object)) === '[object Number]' && | ||
(object % 1 === 0 && !common.isNegativeZero(object)); | ||
} | ||
@@ -175,0 +160,0 @@ |
@@ -18,3 +18,3 @@ 'use strict'; | ||
/*global window */ | ||
if (typeof window !== 'undefined') { esprima = window.esprima; } | ||
if (typeof window !== 'undefined') esprima = window.esprima; | ||
} | ||
@@ -25,5 +25,3 @@ | ||
function resolveJavascriptFunction(data) { | ||
if (null === data) { | ||
return false; | ||
} | ||
if (data === null) return false; | ||
@@ -34,6 +32,6 @@ try { | ||
if ('Program' !== ast.type || | ||
1 !== ast.body.length || | ||
'ExpressionStatement' !== ast.body[0].type || | ||
'FunctionExpression' !== ast.body[0].expression.type) { | ||
if (ast.type !== 'Program' || | ||
ast.body.length !== 1 || | ||
ast.body[0].type !== 'ExpressionStatement' || | ||
ast.body[0].expression.type !== 'FunctionExpression') { | ||
return false; | ||
@@ -56,6 +54,6 @@ } | ||
if ('Program' !== ast.type || | ||
1 !== ast.body.length || | ||
'ExpressionStatement' !== ast.body[0].type || | ||
'FunctionExpression' !== ast.body[0].expression.type) { | ||
if (ast.type !== 'Program' || | ||
ast.body.length !== 1 || | ||
ast.body[0].type !== 'ExpressionStatement' || | ||
ast.body[0].expression.type !== 'FunctionExpression') { | ||
throw new Error('Failed to resolve function'); | ||
@@ -81,3 +79,3 @@ } | ||
function isFunction(object) { | ||
return '[object Function]' === Object.prototype.toString.call(object); | ||
return Object.prototype.toString.call(object) === '[object Function]'; | ||
} | ||
@@ -84,0 +82,0 @@ |
@@ -6,10 +6,5 @@ 'use strict'; | ||
function resolveJavascriptRegExp(data) { | ||
if (null === data) { | ||
return false; | ||
} | ||
if (data === null) return false; | ||
if (data.length === 0) return false; | ||
if (0 === data.length) { | ||
return false; | ||
} | ||
var regexp = data, | ||
@@ -21,19 +16,11 @@ tail = /\/([gim]*)$/.exec(data), | ||
// `/foo/gim` - modifiers tail can be maximum 3 chars | ||
if ('/' === regexp[0]) { | ||
if (tail) { | ||
modifiers = tail[1]; | ||
} | ||
if (regexp[0] === '/') { | ||
if (tail) modifiers = tail[1]; | ||
if (modifiers.length > 3) { return false; } | ||
if (modifiers.length > 3) return false; | ||
// if expression starts with /, is should be properly terminated | ||
if (regexp[regexp.length - modifiers.length - 1] !== '/') { return false; } | ||
regexp = regexp.slice(1, regexp.length - modifiers.length - 1); | ||
if (regexp[regexp.length - modifiers.length - 1] !== '/') return false; | ||
} | ||
try { | ||
return true; | ||
} catch (error) { | ||
return false; | ||
} | ||
return true; | ||
} | ||
@@ -47,6 +34,4 @@ | ||
// `/foo/gim` - tail can be maximum 4 chars | ||
if ('/' === regexp[0]) { | ||
if (tail) { | ||
modifiers = tail[1]; | ||
} | ||
if (regexp[0] === '/') { | ||
if (tail) modifiers = tail[1]; | ||
regexp = regexp.slice(1, regexp.length - modifiers.length - 1); | ||
@@ -61,14 +46,6 @@ } | ||
if (object.global) { | ||
result += 'g'; | ||
} | ||
if (object.global) result += 'g'; | ||
if (object.multiline) result += 'm'; | ||
if (object.ignoreCase) result += 'i'; | ||
if (object.multiline) { | ||
result += 'm'; | ||
} | ||
if (object.ignoreCase) { | ||
result += 'i'; | ||
} | ||
return result; | ||
@@ -78,3 +55,3 @@ } | ||
function isRegExp(object) { | ||
return '[object RegExp]' === Object.prototype.toString.call(object); | ||
return Object.prototype.toString.call(object) === '[object RegExp]'; | ||
} | ||
@@ -81,0 +58,0 @@ |
@@ -19,3 +19,3 @@ 'use strict'; | ||
function isUndefined(object) { | ||
return 'undefined' === typeof object; | ||
return typeof object === 'undefined'; | ||
} | ||
@@ -22,0 +22,0 @@ |
@@ -7,3 +7,3 @@ 'use strict'; | ||
kind: 'mapping', | ||
construct: function (data) { return null !== data ? data : {}; } | ||
construct: function (data) { return data !== null ? data : {}; } | ||
}); |
@@ -6,3 +6,3 @@ 'use strict'; | ||
function resolveYamlMerge(data) { | ||
return '<<' === data || null === data; | ||
return data === '<<' || data === null; | ||
} | ||
@@ -9,0 +9,0 @@ |
@@ -6,5 +6,3 @@ 'use strict'; | ||
function resolveYamlNull(data) { | ||
if (null === data) { | ||
return true; | ||
} | ||
if (data === null) return true; | ||
@@ -22,3 +20,3 @@ var max = data.length; | ||
function isNull(object) { | ||
return null === object; | ||
return object === null; | ||
} | ||
@@ -25,0 +23,0 @@ |
@@ -9,5 +9,3 @@ 'use strict'; | ||
function resolveYamlOmap(data) { | ||
if (null === data) { | ||
return true; | ||
} | ||
if (data === null) return true; | ||
@@ -21,25 +19,15 @@ var objectKeys = [], index, length, pair, pairKey, pairHasKey, | ||
if ('[object Object]' !== _toString.call(pair)) { | ||
return false; | ||
} | ||
if (_toString.call(pair) !== '[object Object]') return false; | ||
for (pairKey in pair) { | ||
if (_hasOwnProperty.call(pair, pairKey)) { | ||
if (!pairHasKey) { | ||
pairHasKey = true; | ||
} else { | ||
return false; | ||
} | ||
if (!pairHasKey) pairHasKey = true; | ||
else return false; | ||
} | ||
} | ||
if (!pairHasKey) { | ||
return false; | ||
} | ||
if (!pairHasKey) return false; | ||
if (-1 === objectKeys.indexOf(pairKey)) { | ||
objectKeys.push(pairKey); | ||
} else { | ||
return false; | ||
} | ||
if (objectKeys.indexOf(pairKey) === -1) objectKeys.push(pairKey); | ||
else return false; | ||
} | ||
@@ -51,3 +39,3 @@ | ||
function constructYamlOmap(data) { | ||
return null !== data ? data : []; | ||
return data !== null ? data : []; | ||
} | ||
@@ -54,0 +42,0 @@ |
@@ -8,5 +8,3 @@ 'use strict'; | ||
function resolveYamlPairs(data) { | ||
if (null === data) { | ||
return true; | ||
} | ||
if (data === null) return true; | ||
@@ -21,11 +19,7 @@ var index, length, pair, keys, result, | ||
if ('[object Object]' !== _toString.call(pair)) { | ||
return false; | ||
} | ||
if (_toString.call(pair) !== '[object Object]') return false; | ||
keys = Object.keys(pair); | ||
if (1 !== keys.length) { | ||
return false; | ||
} | ||
if (keys.length !== 1) return false; | ||
@@ -39,5 +33,3 @@ result[index] = [ keys[0], pair[keys[0]] ]; | ||
function constructYamlPairs(data) { | ||
if (null === data) { | ||
return []; | ||
} | ||
if (data === null) return []; | ||
@@ -44,0 +36,0 @@ var index, length, pair, keys, result, |
@@ -7,3 +7,3 @@ 'use strict'; | ||
kind: 'sequence', | ||
construct: function (data) { return null !== data ? data : []; } | ||
construct: function (data) { return data !== null ? data : []; } | ||
}); |
@@ -8,5 +8,3 @@ 'use strict'; | ||
function resolveYamlSet(data) { | ||
if (null === data) { | ||
return true; | ||
} | ||
if (data === null) return true; | ||
@@ -17,5 +15,3 @@ var key, object = data; | ||
if (_hasOwnProperty.call(object, key)) { | ||
if (null !== object[key]) { | ||
return false; | ||
} | ||
if (object[key] !== null) return false; | ||
} | ||
@@ -28,3 +24,3 @@ } | ||
function constructYamlSet(data) { | ||
return null !== data ? data : {}; | ||
return data !== null ? data : {}; | ||
} | ||
@@ -31,0 +27,0 @@ |
@@ -7,3 +7,3 @@ 'use strict'; | ||
kind: 'scalar', | ||
construct: function (data) { return null !== data ? data : ''; } | ||
construct: function (data) { return data !== null ? data : ''; } | ||
}); |
@@ -18,10 +18,4 @@ 'use strict'; | ||
function resolveYamlTimestamp(data) { | ||
if (null === data) { | ||
return false; | ||
} | ||
if (YAML_TIMESTAMP_REGEXP.exec(data) === null) { | ||
return false; | ||
} | ||
if (data === null) return false; | ||
if (YAML_TIMESTAMP_REGEXP.exec(data) === null) return false; | ||
return true; | ||
@@ -36,5 +30,3 @@ } | ||
if (null === match) { | ||
throw new Error('Date resolve error'); | ||
} | ||
if (match === null) throw new Error('Date resolve error'); | ||
@@ -71,5 +63,3 @@ // match: [1] year [2] month [3] day | ||
delta = (tz_hour * 60 + tz_minute) * 60000; // delta in mili-seconds | ||
if ('-' === match[9]) { | ||
delta = -delta; | ||
} | ||
if (match[9] === '-') delta = -delta; | ||
} | ||
@@ -79,5 +69,3 @@ | ||
if (delta) { | ||
date.setTime(date.getTime() - delta); | ||
} | ||
if (delta) date.setTime(date.getTime() - delta); | ||
@@ -84,0 +72,0 @@ return date; |
{ | ||
"name": "js-yaml", | ||
"version": "3.5.2", | ||
"version": "3.5.3", | ||
"description": "YAML 1.2 parser and serializer", | ||
@@ -38,4 +38,3 @@ "keywords": [ | ||
"codemirror": "^5.10.0", | ||
"eslint": "0.24.1", | ||
"eslint-plugin-nodeca": "^1.0.3", | ||
"eslint": "^2.0.0-rc.1", | ||
"istanbul": "*", | ||
@@ -42,0 +41,0 @@ "mocha": "*", |
Sorry, the diff of this file is too big to display
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
8
265209
6178