Comparing version 2.0.4 to 2.0.5
# hjson-js History | ||
- v2.0.5 | ||
- fix stringify for strings staring with a punctuator char | ||
- v2.0.4 | ||
@@ -4,0 +6,0 @@ - move to hjson org |
/*! @preserve | ||
* Hjson v2.0.3 | ||
* Hjson v2.0.5 | ||
* http://hjson.org | ||
@@ -513,8 +513,7 @@ * | ||
// needsEscape is used to detect and replace characters | ||
// needsEscape tests if the string can be written without escapes | ||
var needsEscape = /[\\\"\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g; | ||
// like needsEscape but without \\ and \" | ||
var needsQuotes = /[\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g; | ||
var needsQuotes2 = /^\s|^"|^'''|^#|^\/\*|^\/\/|^\{|^\[|\s$/g; | ||
// ''' || (needsQuotes but without \n and \r) | ||
// needsQuotes tests if the string can be written as a quoteless string (includes needsEscape but without \\ and \") | ||
var needsQuotes = /^\s|^"|^'''|^#|^\/\*|^\/\/|^\{|^\}|^\[|^\]|^:|^,|\s$|[\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g; | ||
// needsEscapeML tests if the string can be written as a multiline string (includes needsEscape but without \n, \r, \\ and \") | ||
var needsEscapeML = /'''|[\x00-\x09\x0b\x0c\x0e-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g; | ||
@@ -551,3 +550,2 @@ // starts with a keyword and optionally is followed by a comment | ||
needsQuotes.lastIndex = 0; | ||
needsQuotes2.lastIndex = 0; | ||
startsWithKeyword.lastIndex = 0; | ||
@@ -559,3 +557,3 @@ | ||
if (quoteAlways || hasComment || | ||
needsQuotes.test(string) || needsQuotes2.test(string) || | ||
needsQuotes.test(string) || | ||
tryParseNumber(string, true) !== undefined || | ||
@@ -562,0 +560,0 @@ startsWithKeyword.test(string)) { |
/*! @preserve | ||
* Hjson v2.0.3 | ||
* Hjson v2.0.5 | ||
* http://hjson.org | ||
@@ -12,2 +12,2 @@ * | ||
*/ | ||
var Hjson=function(){"use strict";var r="\n",e=function(r,e){function n(){return u=r.charAt(a),a++,u}var t,u,f="",o=0,i=!0,a=0;for(n(),"-"===u&&(f="-",n());u>="0"&&"9">=u;)i&&("0"==u?o++:i=!1),f+=u,n();if(i&&o--,"."===u)for(f+=".";n()&&u>="0"&&"9">=u;)f+=u;if("e"===u||"E"===u)for(f+=u,n(),("-"===u||"+"===u)&&(f+=u,n());u>="0"&&"9">=u;)f+=u,n();for(;u&&" ">=u;)n();return e&&(","===u||"}"===u||"]"===u||"#"===u||"/"===u&&("/"===r[a]||"*"===r[a]))&&(u=0),t=+f,u||o||!isFinite(t)?void 0:t},n=function(){function r(){u=0,f=" "}function n(r){return"{"===r||"}"===r||"["===r||"]"===r||","===r||":"===r}var t,u,f,o,i={'"':'"',"\\":"\\","/":"/",b:"\b",f:"\f",n:"\n",r:"\r",t:" "},a=function(r){var e,n=0,f=1;for(e=u-1;e>0&&"\n"!==t[e];e--,n++);for(;e>0;e--)"\n"===t[e]&&f++;throw new Error(r+" at line "+f+","+n+" >>>"+t.substr(u-n,20)+" ...")},c=function(){return f=t.charAt(u),u++,f},s=function(r){return t.charAt(u+r)},l=function(){var r="";if('"'===f)for(;c();){if('"'===f)return c(),r;if("\\"===f)if(c(),"u"===f){for(var e=0,n=0;4>n;n++){c();var t,u=f.charCodeAt(0);f>="0"&&"9">=f?t=u-48:f>="a"&&"f">=f?t=u-97+10:f>="A"&&"F">=f?t=u-65+10:a("Bad \\u char "+f),e=16*e+t}r+=String.fromCharCode(e)}else{if("string"!=typeof i[f])break;r+=i[f]}else r+=f}a("Bad string")},p=function(){for(var r="",e=0,n=0;;){var t=s(-n-5);if(!t||"\n"===t)break;n++}for(var u=function(){for(var r=n;f&&" ">=f&&"\n"!==f&&r-->0;)c()};f&&" ">=f&&"\n"!==f;)c();for("\n"===f&&(c(),u());;){if(f){if("'"===f){if(e++,c(),3===e)return"\n"===r.slice(-1)&&(r=r.slice(0,-1)),r;continue}for(;e>0;)r+="'",e--}else a("Bad multiline string");"\n"===f?(r+="\n",c(),u()):("\r"!==f&&(r+=f),c())}},h=function(){if('"'===f)return l();for(var r="",e=u,t=-1;;){if(":"===f)return r?t>=0&&t!==r.length&&(u=e+t,a("Found whitespace in your key name (use quotes to include)")):a("Found ':' but no key name (for an empty key name use quotes)"),r;" ">=f?f?0>t&&(t=r.length):a("Found EOF while looking for a key name (check your syntax)"):n(f)?a("Found '"+f+"' where a key name was expected (check your syntax or use quotes if the key name includes {}[],: or whitespace)"):r+=f,c()}},d=function(){for(;f;){for(;f&&" ">=f;)c();if("#"===f||"/"===f&&"/"===s(0))for(;f&&"\n"!==f;)c();else{if("/"!==f||"*"!==s(0))break;for(c(),c();f&&("*"!==f||"/"!==s(0));)c();f&&(c(),c())}}},y=function(){var r=f;for(n(f)&&a("Found a punctuator character '"+f+"' when excpecting a quoteless string (check your syntax)");;){if(c(),3===r.length&&"'''"===r)return p();var t="\r"===f||"\n"===f||""===f;if(t||","===f||"}"===f||"]"===f||"#"===f||"/"===f&&("/"===s(0)||"*"===s(0))){var u=r[0];switch(u){case"f":if("false"===r.trim())return!1;break;case"n":if("null"===r.trim())return null;break;case"t":if("true"===r.trim())return!0;break;default:if("-"===u||u>="0"&&"9">=u){var o=e(r);if(void 0!==o)return o}}if(t)return r.trim()}r+=f}},b=function(r){var e;for(r--,e=u-2;e>r&&t[e]<=" "&&"\n"!==t[e];e--);"\n"===t[e]&&e--,"\r"===t[e]&&e--;var n=t.substr(r,e-r+1);for(e=0;e<n.length;e++)if(n[e]>" ")return n;return""},g=function(){var r,e,n=[];if(o&&(Object.defineProperty&&Object.defineProperty(n,"__WSC__",{enumerable:!1,writable:!0}),n.__WSC__=r=[]),c(),e=u,d(),r&&r.push(b(e)),"]"===f)return c(),n;for(;f;){if(n.push(x()),e=u,d(),","===f&&(c(),e=u,d()),r&&r.push(b(e)),"]"===f)return c(),n;d()}a("End of input while parsing an array (did you forget a closing ']'?)")},v=function(r){function e(r){t.c[r]=b(i),r&&t.o.push(r)}var n,t,i,s={};if(o&&(Object.defineProperty&&Object.defineProperty(s,"__WSC__",{enumerable:!1,writable:!0}),s.__WSC__=t={c:{},o:[]},r&&(t.noRootBraces=!0)),r?i=1:(c(),i=u),d(),t&&e(""),"}"===f&&!r)return c(),s;for(;f;){if(n=h(),d(),":"!==f&&a("Expected ':' instead of '"+f+"'"),c(),s[n]=x(),i=u,d(),","===f&&(c(),i=u,d()),t&&e(n),"}"===f&&!r)return c(),s;d()}return r?s:void a("End of input while parsing an object (did you forget a closing '}'?)")},x=function(){switch(d(),f){case"{":return v();case"[":return g();case'"':return l();default:return y()}},k=function(){switch(d(),f){case"{":return v();case"[":return g()}try{return v(!0)}catch(e){r();try{return x()}catch(n){throw e}}};return function(e,n){var u;return o=n&&n.keepWsc,t=e,r(),u=k(),d(),f&&a("Syntax error, found trailing characters"),u}}(),t=function(){function n(r){return r.replace(p,function(r){var e=g[r];return"string"==typeof e?e:"\\u"+("0000"+r.charCodeAt(0).toString(16)).slice(-4)})}function t(r,t,f,o){return r?(h.lastIndex=0,d.lastIndex=0,b.lastIndex=0,s||f||h.test(r)||d.test(r)||void 0!==e(r,!0)||b.test(r)?(p.lastIndex=0,y.lastIndex=0,p.test(r)?y.test(r)||o?'"'+n(r)+'"':u(r,t):'"'+r+'"'):r):'""'}function u(r,e){var n,t=r.replace(/\r/g,"").split("\n");if(e+=k,1===t.length)return"'''"+t[0]+"'''";var u=i+e+"'''";for(n=0;n<t.length;n++)u+=i,t[n]&&(u+=e+t[n]);return u+i+e+"'''"}function f(r){return r?v.test(r)?(p.lastIndex=0,'"'+(p.test(r)?n(r):r)+'"'):r:'""'}function o(r,e,n,u){function s(r){return r&&"\n"===r["\r"===r[0]?1:0]}function p(r){return r&&!s(r)}function h(r){if(!r)return"";for(var e=0;e<r.length;e++){var n=r[e];if("\n"===n||"#"===n||"/"===n&&("/"===r[e+1]||"*"===r[e+1]))break;if(n>" ")return" # "+r}return r}switch(typeof r){case"string":return t(r,x,e,u);case"number":return isFinite(r)?String(r):"null";case"boolean":return String(r);case"object":if(!r)return"null";var d,y;a&&(d=r.__WSC__);var b="[object Array]"===Object.prototype.toString.apply(r),g=b||!u||(d?!d.noRootBraces:l),v=x;g&&(x+=k);var m,j,w,_,O=i+v,S=i+x,C=n||c?"":O,E=[];if(b){for(m=0,j=r.length;j>m;m++)d&&E.push(h(d[m])+S),E.push(o(r[m],d?p(d[m+1]):!1,!0)||"null");d&&E.push(h(d[m])+O),_=d?C+"["+E.join("")+"]":0===E.length?"[]":C+"["+S+E.join(S)+O+"]"}else{if(d){y=h(d.c[""]);var F=d.o.slice();for(w in r)Object.prototype.hasOwnProperty.call(r,w)&&F.indexOf(w)<0&&F.push(w);for(m=0,j=F.length;j>m;m++)w=F[m],(g||m>0||y)&&E.push(y+S),y=h(d.c[w]),_=o(r[w],p(y)),_&&E.push(f(w)+(s(_)?":":": ")+_);(g||y)&&E.push(y+O)}else for(w in r)Object.prototype.hasOwnProperty.call(r,w)&&(_=o(r[w]),_&&E.push(f(w)+(s(_)?":":": ")+_));_=0===E.length?"{}":g?d?C+"{"+E.join("")+"}":C+"{"+S+E.join(S)+O+"}":E.join(d?"":S)}return x=v,_}}var i,a,c,s,l,p=/[\\\"\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,h=/[\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,d=/^\s|^"|^'''|^#|^\/\*|^\/\/|^\{|^\[|\s$/g,y=/'''|[\x00-\x09\x0b\x0c\x0e-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,b=/^(true|false|null)\s*((,|\]|\}|#|\/\/|\/\*).*)?$/,g={"\b":"\\b"," ":"\\t","\n":"\\n","\f":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"},v=/[,\{\[\}\]\s:#"]|\/\/|\/\*|'''/,x="",k=" ";return function(e,n){var t,u;if(i=r,k=" ",a=!1,c=!1,l=!0,s=!1,n&&"object"==typeof n&&(("\n"===n.eol||"\r\n"===n.eol)&&(i=n.eol),u=n.space,a=n.keepWsc,c=n.bracesSameLine,l=n.emitRootBraces,s="always"===n.quotes),"number"==typeof u)for(k="",t=0;u>t;t++)k+=" ";else"string"==typeof u&&(k=u);return o(e,null,!0,!0)}}();return{parse:n,stringify:t,endOfLine:function(){return r},setEndOfLine:function(e){("\n"===e||"\r\n"===e)&&(r=e)},rt:{parse:function(r,e){return(e=e||{}).keepWsc=!0,n(r,e)},stringify:function(r,e){return(e=e||{}).keepWsc=!0,t(r,e)}}}}();if("object"==typeof module){if("function"==typeof require){var os=require("os");Hjson.setEndOfLine(os.EOL)}module.exports=Hjson} | ||
var Hjson=function(){"use strict";var r="\n",e=function(r,e){function n(){return u=r.charAt(a),a++,u}var t,u,f="",o=0,i=!0,a=0;for(n(),"-"===u&&(f="-",n());u>="0"&&"9">=u;)i&&("0"==u?o++:i=!1),f+=u,n();if(i&&o--,"."===u)for(f+=".";n()&&u>="0"&&"9">=u;)f+=u;if("e"===u||"E"===u)for(f+=u,n(),("-"===u||"+"===u)&&(f+=u,n());u>="0"&&"9">=u;)f+=u,n();for(;u&&" ">=u;)n();return e&&(","===u||"}"===u||"]"===u||"#"===u||"/"===u&&("/"===r[a]||"*"===r[a]))&&(u=0),t=+f,u||o||!isFinite(t)?void 0:t},n=function(){function r(){u=0,f=" "}function n(r){return"{"===r||"}"===r||"["===r||"]"===r||","===r||":"===r}var t,u,f,o,i={'"':'"',"\\":"\\","/":"/",b:"\b",f:"\f",n:"\n",r:"\r",t:" "},a=function(r){var e,n=0,f=1;for(e=u-1;e>0&&"\n"!==t[e];e--,n++);for(;e>0;e--)"\n"===t[e]&&f++;throw new Error(r+" at line "+f+","+n+" >>>"+t.substr(u-n,20)+" ...")},c=function(){return f=t.charAt(u),u++,f},s=function(r){return t.charAt(u+r)},l=function(){var r="";if('"'===f)for(;c();){if('"'===f)return c(),r;if("\\"===f)if(c(),"u"===f){for(var e=0,n=0;4>n;n++){c();var t,u=f.charCodeAt(0);f>="0"&&"9">=f?t=u-48:f>="a"&&"f">=f?t=u-97+10:f>="A"&&"F">=f?t=u-65+10:a("Bad \\u char "+f),e=16*e+t}r+=String.fromCharCode(e)}else{if("string"!=typeof i[f])break;r+=i[f]}else r+=f}a("Bad string")},p=function(){for(var r="",e=0,n=0;;){var t=s(-n-5);if(!t||"\n"===t)break;n++}for(var u=function(){for(var r=n;f&&" ">=f&&"\n"!==f&&r-->0;)c()};f&&" ">=f&&"\n"!==f;)c();for("\n"===f&&(c(),u());;){if(f){if("'"===f){if(e++,c(),3===e)return"\n"===r.slice(-1)&&(r=r.slice(0,-1)),r;continue}for(;e>0;)r+="'",e--}else a("Bad multiline string");"\n"===f?(r+="\n",c(),u()):("\r"!==f&&(r+=f),c())}},h=function(){if('"'===f)return l();for(var r="",e=u,t=-1;;){if(":"===f)return r?t>=0&&t!==r.length&&(u=e+t,a("Found whitespace in your key name (use quotes to include)")):a("Found ':' but no key name (for an empty key name use quotes)"),r;" ">=f?f?0>t&&(t=r.length):a("Found EOF while looking for a key name (check your syntax)"):n(f)?a("Found '"+f+"' where a key name was expected (check your syntax or use quotes if the key name includes {}[],: or whitespace)"):r+=f,c()}},d=function(){for(;f;){for(;f&&" ">=f;)c();if("#"===f||"/"===f&&"/"===s(0))for(;f&&"\n"!==f;)c();else{if("/"!==f||"*"!==s(0))break;for(c(),c();f&&("*"!==f||"/"!==s(0));)c();f&&(c(),c())}}},y=function(){var r=f;for(n(f)&&a("Found a punctuator character '"+f+"' when excpecting a quoteless string (check your syntax)");;){if(c(),3===r.length&&"'''"===r)return p();var t="\r"===f||"\n"===f||""===f;if(t||","===f||"}"===f||"]"===f||"#"===f||"/"===f&&("/"===s(0)||"*"===s(0))){var u=r[0];switch(u){case"f":if("false"===r.trim())return!1;break;case"n":if("null"===r.trim())return null;break;case"t":if("true"===r.trim())return!0;break;default:if("-"===u||u>="0"&&"9">=u){var o=e(r);if(void 0!==o)return o}}if(t)return r.trim()}r+=f}},b=function(r){var e;for(r--,e=u-2;e>r&&t[e]<=" "&&"\n"!==t[e];e--);"\n"===t[e]&&e--,"\r"===t[e]&&e--;var n=t.substr(r,e-r+1);for(e=0;e<n.length;e++)if(n[e]>" ")return n;return""},g=function(){var r,e,n=[];if(o&&(Object.defineProperty&&Object.defineProperty(n,"__WSC__",{enumerable:!1,writable:!0}),n.__WSC__=r=[]),c(),e=u,d(),r&&r.push(b(e)),"]"===f)return c(),n;for(;f;){if(n.push(x()),e=u,d(),","===f&&(c(),e=u,d()),r&&r.push(b(e)),"]"===f)return c(),n;d()}a("End of input while parsing an array (did you forget a closing ']'?)")},v=function(r){function e(r){t.c[r]=b(i),r&&t.o.push(r)}var n,t,i,s={};if(o&&(Object.defineProperty&&Object.defineProperty(s,"__WSC__",{enumerable:!1,writable:!0}),s.__WSC__=t={c:{},o:[]},r&&(t.noRootBraces=!0)),r?i=1:(c(),i=u),d(),t&&e(""),"}"===f&&!r)return c(),s;for(;f;){if(n=h(),d(),":"!==f&&a("Expected ':' instead of '"+f+"'"),c(),s[n]=x(),i=u,d(),","===f&&(c(),i=u,d()),t&&e(n),"}"===f&&!r)return c(),s;d()}return r?s:void a("End of input while parsing an object (did you forget a closing '}'?)")},x=function(){switch(d(),f){case"{":return v();case"[":return g();case'"':return l();default:return y()}},k=function(){switch(d(),f){case"{":return v();case"[":return g()}try{return v(!0)}catch(e){r();try{return x()}catch(n){throw e}}};return function(e,n){var u;return o=n&&n.keepWsc,t=e,r(),u=k(),d(),f&&a("Syntax error, found trailing characters"),u}}(),t=function(){function n(r){return r.replace(p,function(r){var e=b[r];return"string"==typeof e?e:"\\u"+("0000"+r.charCodeAt(0).toString(16)).slice(-4)})}function t(r,t,f,o){return r?(h.lastIndex=0,y.lastIndex=0,s||f||h.test(r)||void 0!==e(r,!0)||y.test(r)?(p.lastIndex=0,d.lastIndex=0,p.test(r)?d.test(r)||o?'"'+n(r)+'"':u(r,t):'"'+r+'"'):r):'""'}function u(r,e){var n,t=r.replace(/\r/g,"").split("\n");if(e+=x,1===t.length)return"'''"+t[0]+"'''";var u=i+e+"'''";for(n=0;n<t.length;n++)u+=i,t[n]&&(u+=e+t[n]);return u+i+e+"'''"}function f(r){return r?g.test(r)?(p.lastIndex=0,'"'+(p.test(r)?n(r):r)+'"'):r:'""'}function o(r,e,n,u){function s(r){return r&&"\n"===r["\r"===r[0]?1:0]}function p(r){return r&&!s(r)}function h(r){if(!r)return"";for(var e=0;e<r.length;e++){var n=r[e];if("\n"===n||"#"===n||"/"===n&&("/"===r[e+1]||"*"===r[e+1]))break;if(n>" ")return" # "+r}return r}switch(typeof r){case"string":return t(r,v,e,u);case"number":return isFinite(r)?String(r):"null";case"boolean":return String(r);case"object":if(!r)return"null";var d,y;a&&(d=r.__WSC__);var b="[object Array]"===Object.prototype.toString.apply(r),g=b||!u||(d?!d.noRootBraces:l),k=v;g&&(v+=x);var m,j,w,_,O=i+k,S=i+v,C=n||c?"":O,E=[];if(b){for(m=0,j=r.length;j>m;m++)d&&E.push(h(d[m])+S),E.push(o(r[m],d?p(d[m+1]):!1,!0)||"null");d&&E.push(h(d[m])+O),_=d?C+"["+E.join("")+"]":0===E.length?"[]":C+"["+S+E.join(S)+O+"]"}else{if(d){y=h(d.c[""]);var F=d.o.slice();for(w in r)Object.prototype.hasOwnProperty.call(r,w)&&F.indexOf(w)<0&&F.push(w);for(m=0,j=F.length;j>m;m++)w=F[m],(g||m>0||y)&&E.push(y+S),y=h(d.c[w]),_=o(r[w],p(y)),_&&E.push(f(w)+(s(_)?":":": ")+_);(g||y)&&E.push(y+O)}else for(w in r)Object.prototype.hasOwnProperty.call(r,w)&&(_=o(r[w]),_&&E.push(f(w)+(s(_)?":":": ")+_));_=0===E.length?"{}":g?d?C+"{"+E.join("")+"}":C+"{"+S+E.join(S)+O+"}":E.join(d?"":S)}return v=k,_}}var i,a,c,s,l,p=/[\\\"\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,h=/^\s|^"|^'''|^#|^\/\*|^\/\/|^\{|^\}|^\[|^\]|^:|^,|\s$|[\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,d=/'''|[\x00-\x09\x0b\x0c\x0e-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,y=/^(true|false|null)\s*((,|\]|\}|#|\/\/|\/\*).*)?$/,b={"\b":"\\b"," ":"\\t","\n":"\\n","\f":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"},g=/[,\{\[\}\]\s:#"]|\/\/|\/\*|'''/,v="",x=" ";return function(e,n){var t,u;if(i=r,x=" ",a=!1,c=!1,l=!0,s=!1,n&&"object"==typeof n&&(("\n"===n.eol||"\r\n"===n.eol)&&(i=n.eol),u=n.space,a=n.keepWsc,c=n.bracesSameLine,l=n.emitRootBraces,s="always"===n.quotes),"number"==typeof u)for(x="",t=0;u>t;t++)x+=" ";else"string"==typeof u&&(x=u);return o(e,null,!0,!0)}}();return{parse:n,stringify:t,endOfLine:function(){return r},setEndOfLine:function(e){("\n"===e||"\r\n"===e)&&(r=e)},rt:{parse:function(r,e){return(e=e||{}).keepWsc=!0,n(r,e)},stringify:function(r,e){return(e=e||{}).keepWsc=!0,t(r,e)}}}}();if("object"==typeof module){if("function"==typeof require){var os=require("os");Hjson.setEndOfLine(os.EOL)}module.exports=Hjson} |
@@ -6,3 +6,3 @@ { | ||
"author": "Christian Zangl", | ||
"version": "2.0.4", | ||
"version": "2.0.5", | ||
"keywords": [ | ||
@@ -9,0 +9,0 @@ "json", |
@@ -10,7 +10,23 @@ { | ||
"kw3": "null,123", | ||
"close1": "1 }", | ||
"close1": "1}", | ||
"close1b": "1 }", | ||
"close2": "1]", | ||
"close2b": "1 ]", | ||
"close3": "1,", | ||
"close3b": "1 ,", | ||
"comment1": "1#str", | ||
"comment2": "1//str", | ||
"comment3": "1/*str*/" | ||
"comment3": "1/*str*/", | ||
"punc1": "{", | ||
"punc1b": "{foo", | ||
"punc2": "}", | ||
"punc2b": "}foo", | ||
"punc3": "[", | ||
"punc3b": "[foo", | ||
"punc4": "]", | ||
"punc4b": "]foo", | ||
"punc5": ",", | ||
"punc5b": ",foo", | ||
"punc6": ":", | ||
"punc6b": ":foo" | ||
}, | ||
@@ -17,0 +33,0 @@ "noquotes": { |
charset_test.hjson | ||
comments_test.hjson | ||
empty_test.hjson | ||
fail10_test.json | ||
fail11_test.json | ||
fail12_test.json | ||
fail13_test.json | ||
fail14_test.json | ||
fail15_test.json | ||
fail16_test.json | ||
fail17_test.json | ||
fail19_test.json | ||
fail20_test.json | ||
fail21_test.json | ||
fail22_test.json | ||
fail23_test.json | ||
fail24_test.json | ||
fail26_test.json | ||
fail28_test.json | ||
fail29_test.json | ||
fail2_test.json | ||
fail30_test.json | ||
fail31_test.json | ||
fail32_test.json | ||
fail33_test.json | ||
fail34_test.json | ||
fail5_test.json | ||
fail6_test.json | ||
fail7_test.json | ||
fail8_test.json | ||
failCharset1_test.hjson | ||
failJSON02_test.json | ||
failJSON05_test.json | ||
failJSON06_test.json | ||
failJSON07_test.json | ||
failJSON08_test.json | ||
failJSON10_test.json | ||
failJSON11_test.json | ||
failJSON12_test.json | ||
failJSON13_test.json | ||
failJSON14_test.json | ||
failJSON15_test.json | ||
failJSON16_test.json | ||
failJSON17_test.json | ||
failJSON19_test.json | ||
failJSON20_test.json | ||
failJSON21_test.json | ||
failJSON22_test.json | ||
failJSON23_test.json | ||
failJSON24_test.json | ||
failJSON26_test.json | ||
failJSON28_test.json | ||
failJSON29_test.json | ||
failJSON30_test.json | ||
failJSON31_test.json | ||
failJSON32_test.json | ||
failJSON33_test.json | ||
failJSON34_test.json | ||
failKey1_test.hjson | ||
@@ -39,9 +40,26 @@ failKey2_test.hjson | ||
failObj3_test.hjson | ||
failStr1_test.hjson | ||
failStr2_test.hjson | ||
failStr3_test.hjson | ||
failStr4_test.hjson | ||
failStr5_test.hjson | ||
failStr6_test.hjson | ||
failStr7_test.hjson | ||
failStr1a_test.hjson | ||
failStr1b_test.hjson | ||
failStr1c_test.hjson | ||
failStr1d_test.hjson | ||
failStr2a_test.hjson | ||
failStr2b_test.hjson | ||
failStr2c_test.hjson | ||
failStr2d_test.hjson | ||
failStr3a_test.hjson | ||
failStr3b_test.hjson | ||
failStr3c_test.hjson | ||
failStr3d_test.hjson | ||
failStr4a_test.hjson | ||
failStr4b_test.hjson | ||
failStr4c_test.hjson | ||
failStr4d_test.hjson | ||
failStr5a_test.hjson | ||
failStr5b_test.hjson | ||
failStr5c_test.hjson | ||
failStr5d_test.hjson | ||
failStr6a_test.hjson | ||
failStr6b_test.hjson | ||
failStr6c_test.hjson | ||
failStr6d_test.hjson | ||
kan_test.hjson | ||
@@ -48,0 +66,0 @@ keys_test.hjson |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
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
310212
163
2403