Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

hjson

Package Overview
Dependencies
Maintainers
1
Versions
54
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

hjson - npm Package Compare versions

Comparing version 1.8.3 to 1.8.4

13

lib/hjson.js
/*! @preserve
* Hjson v1.8.3
* Hjson v1.8.4
* http://hjson.org

@@ -524,5 +524,9 @@ *

// needsEscape is used to detect and replace characters
var needsEscape = /[\\\"\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g;
var needsQuotes = /[\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 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; // ''' || (needsQuotes but without \n and \r)
// 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;
// ''' || (needsQuotes but without \n and \r)
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;
// starts with a keyword and optionally is followed by a comment
var startsWithKeyword = /^(true|false|null)\s*((,|\]|\}|#|\/\/|\/\*).*)?$/;

@@ -539,3 +543,3 @@ var meta =

};
var needsEscapeName = /[,\{\[\}\]\s:#]|\/\/|\/\*/;
var needsEscapeName = /[,\{\[\}\]\s:#"]|\/\/|\/\*|'''/;
var gap = '';

@@ -570,2 +574,3 @@ var indent = ' ';

first === '"' ||
first === '\'' && string[1] === '\'' && string[2] === '\'' ||
first === '#' ||

@@ -572,0 +577,0 @@ first === '/' && (string[1] === '*' || string[1] === '/') ||

/*! @preserve
* Hjson v1.8.3
* Hjson v1.8.4
* http://hjson.org

@@ -12,2 +12,2 @@ *

*/
var Hjson=function(){"use strict";var r="\n",e=!1,n=function(r,e){function n(){return u=r.charAt(a),a++,u}var t,u,f="",i=0,o=!0,a=0;for(n(),"-"===u&&(f="-",n());u>="0"&&"9">=u;)o&&("0"==u?i++:o=!1),f+=u,n();if(o&&i--,"."===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||i||!isFinite(t)?void 0:t},t=function(){function r(){t=0,u=" "}var e,t,u,f,i={'"':'"',"\\":"\\","/":"/",b:"\b",f:"\f",n:"\n",r:"\r",t:" "},o=function(r){var n,u=0,f=1;for(n=t-1;n>0&&"\n"!==e[n];n--,u++);for(;n>0;n--)"\n"===e[n]&&f++;throw new Error(r+" at line "+f+","+u+" >>>"+e.substr(t-u,20)+" ...")},a=function(r){return r&&r!==u&&o("Expected '"+r+"' instead of '"+u+"'"),u=e.charAt(t),t++,u},c=function(r){return e.charAt(t+r)},s=function(){var r,e,n,t="";if('"'===u)for(;a();){if('"'===u)return a(),t;if("\\"===u)if(a(),"u"===u){for(n=0,e=0;4>e&&(r=parseInt(a(),16),isFinite(r));e++)n=16*n+r;t+=String.fromCharCode(n)}else{if("string"!=typeof i[u])break;t+=i[u]}else t+=u}o("Bad string")},l=function(){for(var r="",e=0,n=0;;){var t=c(-n-5);if(!t||"\n"===t)break;n++}for(var f=function(){for(var r=n;u&&" ">=u&&"\n"!==u&&r-->0;)a()};u&&" ">=u&&"\n"!==u;)a();for("\n"===u&&(a(),f());;){if(u){if("'"===u){if(e++,a(),3===e)return"\n"===r.slice(-1)&&(r=r.slice(0,-1)),r;continue}for(;e>0;)r+="'",e--}else o("Bad multiline string");"\n"===u?(r+="\n",a(),f()):("\r"!==u&&(r+=u),a())}},p=function(){if('"'===u)return s();for(var r="",e=t,n=-1;;){if(":"===u)return r?n>=0&&n!==r.length&&(t=e+n,o("Found whitespace in your key name (use quotes to include)")):o("Found ':' but no key name (for an empty key name use quotes)"),r;" ">=u?u?0>n&&(n=r.length):o("Found EOF while looking for a key name (check your syntax)"):"{"===u||"}"===u||"["===u||"]"===u||","===u?o("Found '"+u+"' where a key name was expected (check your syntax or use quotes if the key name includes {}[],: or whitespace)"):r+=u,a()}},h=function(){for(;u;){for(;u&&" ">=u;)a();if("#"===u||"/"===u&&"/"===c(0))for(;u&&"\n"!==u;)a();else{if("/"!==u||"*"!==c(0))break;for(a(),a();u&&("*"!==u||"/"!==c(0));)a();u&&(a(),a())}}},d=function(){for(var r=u;;){if(a(),3===r.length&&"'''"===r)return l();var e="\r"===u||"\n"===u||""===u;if(e||","===u||"}"===u||"]"===u||"#"===u||"/"===u&&("/"===c(0)||"*"===c(0))){var t=r[0];switch(t){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("-"===t||t>="0"&&"9">=t){var f=n(r);if(void 0!==f)return f}}if(e)return r.trim()}r+=u}},b=function(r){var n;for(r--,n=t-2;n>r&&e[n]<=" "&&"\n"!==e[n];n--);"\n"===e[n]&&n--,"\r"===e[n]&&n--;var u=e.substr(r,n-r+1);for(n=0;n<u.length;n++)if(u[n]>" ")return u;return""},y=function(){var r,e,n=[];if(f&&(Object.defineProperty&&Object.defineProperty(n,"__WSC__",{enumerable:!1,writable:!0}),n.__WSC__=r=[]),a(),e=t,h(),r&&r.push(b(e)),"]"===u)return a(),n;for(;u;){if(n.push(v()),e=t,h(),","===u&&(a(),e=t,h()),r&&r.push(b(e)),"]"===u)return a(),n;h()}o("End of input while parsing an array (did you forget a closing ']'?)")},g=function(r){function e(r){i.c[r]=b(c),r&&i.o.push(r)}var n,i,c,s={};if(f&&(Object.defineProperty&&Object.defineProperty(s,"__WSC__",{enumerable:!1,writable:!0}),s.__WSC__=i={c:{},o:[]},r&&(i.noRootBraces=!0)),r?c=1:(a(),c=t),h(),i&&e(""),"}"===u&&!r)return a(),s;for(;u;){if(n=p(),h(),a(":"),s[n]=v(),c=t,h(),","===u&&(a(),c=t,h()),i&&e(n),"}"===u&&!r)return a(),s;h()}return r?s:void o("End of input while parsing an object (did you forget a closing '}'?)")},v=function(){switch(h(),u){case"{":return g();case"[":return y();case'"':return s();default:return d()}},x=function(){switch(h(),u){case"{":return g();case"[":return y()}try{return g(!0)}catch(e){r();try{return v()}catch(n){throw e}}};return function(n,t){var i;return f=t&&t.keepWsc,e=n,r(),i=x(),h(),u&&o("Syntax error, found trailing characters"),i}}(),u=function(){function t(r){return" ">=r}function u(r){return r.replace(d,function(r){var e=v[r];return"string"==typeof e?e:"\\u"+("0000"+r.charCodeAt(0).toString(16)).slice(-4)})}function f(r,e,f,o){if(!r)return'""';b.lastIndex=0,g.lastIndex=0;var a=p||f||b.test(r),c=r[0],s=r[r.length-1];return a||t(c)||'"'===c||"#"===c||"/"===c&&("*"===r[1]||"/"===r[1])||"{"===c||"["===c||t(s)||void 0!==n(r,!0)||g.test(r)?(d.lastIndex=0,y.lastIndex=0,d.test(r)?y.test(r)||o?'"'+u(r)+'"':i(r,e):'"'+r+'"'):r}function i(r,e){var n,t=r.replace(/\r/g,"").split("\n");if(e+=j,1===t.length)return"'''"+t[0]+"'''";var u=c+e+"'''";for(n=0;n<t.length;n++)u+=c,t[n]&&(u+=e+t[n]);return u+c+e+"'''"}function o(r){return r?x.test(r)?(d.lastIndex=0,'"'+(d.test(r)?u(r):r)+'"'):r:'""'}function a(r,e,n,t){function u(r){return r&&"\n"===r["\r"===r[0]?1:0]}function i(r){return r&&!u(r)}function p(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 f(r,m,e,t);case"number":return isFinite(r)?String(r):"null";case"boolean":return String(r);case"object":if(!r)return"null";var d,b;s&&(d=r.__WSC__);var y="[object Array]"===Object.prototype.toString.apply(r),g=y||!t||(d?!d.noRootBraces:h),v=m;g&&(m+=j);var x,k,_,w,O=c+v,S=c+m,E=n||l?"":O,W=[];if(y){for(x=0,k=r.length;k>x;x++)d&&W.push(p(d[x])+S),W.push(a(r[x],d?i(d[x+1]):!1,!0)||"null");d&&W.push(p(d[x])+O),w=d?E+"["+W.join("")+"]":0===W.length?"[]":E+"["+S+W.join(S)+O+"]"}else{if(d){b=p(d.c[""]);var C=d.o.slice();for(_ in r)Object.prototype.hasOwnProperty.call(r,_)&&C.indexOf(_)<0&&C.push(_);for(x=0,k=C.length;k>x;x++)_=C[x],(g||x>0||b)&&W.push(b+S),b=p(d.c[_]),w=a(r[_],i(b)),w&&W.push(o(_)+(u(w)?":":": ")+w);(g||b)&&W.push(b+O)}else for(_ in r)Object.prototype.hasOwnProperty.call(r,_)&&(w=a(r[_]),w&&W.push(o(_)+(u(w)?":":": ")+w));w=0===W.length?"{}":g?d?E+"{"+W.join("")+"}":E+"{"+S+W.join(S)+O+"}":W.join(d?"":S)}return m=v,w}}var c,s,l,p,h,d=/[\\\"\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,b=/[\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/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,g=/^(true|false|null)\s*((,|\]|\}|#|\/\/|\/\*).*)?$/,v={"\b":"\\b"," ":"\\t","\n":"\\n","\f":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"},x=/[,\{\[\}\]\s:#]|\/\/|\/\*/,m="",j=" ";return function(n,t){var u,f;if(c=r,j=" ",s=!1,l=e,h=!0,p=!1,t&&"object"==typeof t&&(("\n"===t.eol||"\r\n"===t.eol)&&(c=t.eol),f=t.space,s=t.keepWsc,l=t.bracesSameLine||e,h=t.emitRootBraces,p="always"===t.quotes),"number"==typeof f)for(j="",u=0;f>u;u++)j+=" ";else"string"==typeof f&&(j=f);return a(n,null,!0,!0)}}();return{parse:t,stringify:u,endOfLine:function(){return r},setEndOfLine:function(e){("\n"===e||"\r\n"===e)&&(r=e)},bracesSameLine:function(){return e},setBracesSameLine:function(r){e=r},rt:{parse:function(r,e){return(e=e||{}).keepWsc=!0,t(r,e)},stringify:function(r,e){return(e=e||{}).keepWsc=!0,u(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=!1,n=function(r,e){function n(){return u=r.charAt(a),a++,u}var t,u,f="",i=0,o=!0,a=0;for(n(),"-"===u&&(f="-",n());u>="0"&&"9">=u;)o&&("0"==u?i++:o=!1),f+=u,n();if(o&&i--,"."===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||i||!isFinite(t)?void 0:t},t=function(){function r(){t=0,u=" "}var e,t,u,f,i={'"':'"',"\\":"\\","/":"/",b:"\b",f:"\f",n:"\n",r:"\r",t:" "},o=function(r){var n,u=0,f=1;for(n=t-1;n>0&&"\n"!==e[n];n--,u++);for(;n>0;n--)"\n"===e[n]&&f++;throw new Error(r+" at line "+f+","+u+" >>>"+e.substr(t-u,20)+" ...")},a=function(r){return r&&r!==u&&o("Expected '"+r+"' instead of '"+u+"'"),u=e.charAt(t),t++,u},c=function(r){return e.charAt(t+r)},s=function(){var r,e,n,t="";if('"'===u)for(;a();){if('"'===u)return a(),t;if("\\"===u)if(a(),"u"===u){for(n=0,e=0;4>e&&(r=parseInt(a(),16),isFinite(r));e++)n=16*n+r;t+=String.fromCharCode(n)}else{if("string"!=typeof i[u])break;t+=i[u]}else t+=u}o("Bad string")},l=function(){for(var r="",e=0,n=0;;){var t=c(-n-5);if(!t||"\n"===t)break;n++}for(var f=function(){for(var r=n;u&&" ">=u&&"\n"!==u&&r-->0;)a()};u&&" ">=u&&"\n"!==u;)a();for("\n"===u&&(a(),f());;){if(u){if("'"===u){if(e++,a(),3===e)return"\n"===r.slice(-1)&&(r=r.slice(0,-1)),r;continue}for(;e>0;)r+="'",e--}else o("Bad multiline string");"\n"===u?(r+="\n",a(),f()):("\r"!==u&&(r+=u),a())}},p=function(){if('"'===u)return s();for(var r="",e=t,n=-1;;){if(":"===u)return r?n>=0&&n!==r.length&&(t=e+n,o("Found whitespace in your key name (use quotes to include)")):o("Found ':' but no key name (for an empty key name use quotes)"),r;" ">=u?u?0>n&&(n=r.length):o("Found EOF while looking for a key name (check your syntax)"):"{"===u||"}"===u||"["===u||"]"===u||","===u?o("Found '"+u+"' where a key name was expected (check your syntax or use quotes if the key name includes {}[],: or whitespace)"):r+=u,a()}},h=function(){for(;u;){for(;u&&" ">=u;)a();if("#"===u||"/"===u&&"/"===c(0))for(;u&&"\n"!==u;)a();else{if("/"!==u||"*"!==c(0))break;for(a(),a();u&&("*"!==u||"/"!==c(0));)a();u&&(a(),a())}}},d=function(){for(var r=u;;){if(a(),3===r.length&&"'''"===r)return l();var e="\r"===u||"\n"===u||""===u;if(e||","===u||"}"===u||"]"===u||"#"===u||"/"===u&&("/"===c(0)||"*"===c(0))){var t=r[0];switch(t){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("-"===t||t>="0"&&"9">=t){var f=n(r);if(void 0!==f)return f}}if(e)return r.trim()}r+=u}},b=function(r){var n;for(r--,n=t-2;n>r&&e[n]<=" "&&"\n"!==e[n];n--);"\n"===e[n]&&n--,"\r"===e[n]&&n--;var u=e.substr(r,n-r+1);for(n=0;n<u.length;n++)if(u[n]>" ")return u;return""},y=function(){var r,e,n=[];if(f&&(Object.defineProperty&&Object.defineProperty(n,"__WSC__",{enumerable:!1,writable:!0}),n.__WSC__=r=[]),a(),e=t,h(),r&&r.push(b(e)),"]"===u)return a(),n;for(;u;){if(n.push(v()),e=t,h(),","===u&&(a(),e=t,h()),r&&r.push(b(e)),"]"===u)return a(),n;h()}o("End of input while parsing an array (did you forget a closing ']'?)")},g=function(r){function e(r){i.c[r]=b(c),r&&i.o.push(r)}var n,i,c,s={};if(f&&(Object.defineProperty&&Object.defineProperty(s,"__WSC__",{enumerable:!1,writable:!0}),s.__WSC__=i={c:{},o:[]},r&&(i.noRootBraces=!0)),r?c=1:(a(),c=t),h(),i&&e(""),"}"===u&&!r)return a(),s;for(;u;){if(n=p(),h(),a(":"),s[n]=v(),c=t,h(),","===u&&(a(),c=t,h()),i&&e(n),"}"===u&&!r)return a(),s;h()}return r?s:void o("End of input while parsing an object (did you forget a closing '}'?)")},v=function(){switch(h(),u){case"{":return g();case"[":return y();case'"':return s();default:return d()}},x=function(){switch(h(),u){case"{":return g();case"[":return y()}try{return g(!0)}catch(e){r();try{return v()}catch(n){throw e}}};return function(n,t){var i;return f=t&&t.keepWsc,e=n,r(),i=x(),h(),u&&o("Syntax error, found trailing characters"),i}}(),u=function(){function t(r){return" ">=r}function u(r){return r.replace(d,function(r){var e=v[r];return"string"==typeof e?e:"\\u"+("0000"+r.charCodeAt(0).toString(16)).slice(-4)})}function f(r,e,f,o){if(!r)return'""';b.lastIndex=0,g.lastIndex=0;var a=p||f||b.test(r),c=r[0],s=r[r.length-1];return a||t(c)||'"'===c||"'"===c&&"'"===r[1]&&"'"===r[2]||"#"===c||"/"===c&&("*"===r[1]||"/"===r[1])||"{"===c||"["===c||t(s)||void 0!==n(r,!0)||g.test(r)?(d.lastIndex=0,y.lastIndex=0,d.test(r)?y.test(r)||o?'"'+u(r)+'"':i(r,e):'"'+r+'"'):r}function i(r,e){var n,t=r.replace(/\r/g,"").split("\n");if(e+=j,1===t.length)return"'''"+t[0]+"'''";var u=c+e+"'''";for(n=0;n<t.length;n++)u+=c,t[n]&&(u+=e+t[n]);return u+c+e+"'''"}function o(r){return r?x.test(r)?(d.lastIndex=0,'"'+(d.test(r)?u(r):r)+'"'):r:'""'}function a(r,e,n,t){function u(r){return r&&"\n"===r["\r"===r[0]?1:0]}function i(r){return r&&!u(r)}function p(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 f(r,m,e,t);case"number":return isFinite(r)?String(r):"null";case"boolean":return String(r);case"object":if(!r)return"null";var d,b;s&&(d=r.__WSC__);var y="[object Array]"===Object.prototype.toString.apply(r),g=y||!t||(d?!d.noRootBraces:h),v=m;g&&(m+=j);var x,k,_,w,O=c+v,S=c+m,E=n||l?"":O,W=[];if(y){for(x=0,k=r.length;k>x;x++)d&&W.push(p(d[x])+S),W.push(a(r[x],d?i(d[x+1]):!1,!0)||"null");d&&W.push(p(d[x])+O),w=d?E+"["+W.join("")+"]":0===W.length?"[]":E+"["+S+W.join(S)+O+"]"}else{if(d){b=p(d.c[""]);var C=d.o.slice();for(_ in r)Object.prototype.hasOwnProperty.call(r,_)&&C.indexOf(_)<0&&C.push(_);for(x=0,k=C.length;k>x;x++)_=C[x],(g||x>0||b)&&W.push(b+S),b=p(d.c[_]),w=a(r[_],i(b)),w&&W.push(o(_)+(u(w)?":":": ")+w);(g||b)&&W.push(b+O)}else for(_ in r)Object.prototype.hasOwnProperty.call(r,_)&&(w=a(r[_]),w&&W.push(o(_)+(u(w)?":":": ")+w));w=0===W.length?"{}":g?d?E+"{"+W.join("")+"}":E+"{"+S+W.join(S)+O+"}":W.join(d?"":S)}return m=v,w}}var c,s,l,p,h,d=/[\\\"\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,b=/[\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/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,g=/^(true|false|null)\s*((,|\]|\}|#|\/\/|\/\*).*)?$/,v={"\b":"\\b"," ":"\\t","\n":"\\n","\f":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"},x=/[,\{\[\}\]\s:#"]|\/\/|\/\*|'''/,m="",j=" ";return function(n,t){var u,f;if(c=r,j=" ",s=!1,l=e,h=!0,p=!1,t&&"object"==typeof t&&(("\n"===t.eol||"\r\n"===t.eol)&&(c=t.eol),f=t.space,s=t.keepWsc,l=t.bracesSameLine||e,h=t.emitRootBraces,p="always"===t.quotes),"number"==typeof f)for(j="",u=0;f>u;u++)j+=" ";else"string"==typeof f&&(j=f);return a(n,null,!0,!0)}}();return{parse:t,stringify:u,endOfLine:function(){return r},setEndOfLine:function(e){("\n"===e||"\r\n"===e)&&(r=e)},bracesSameLine:function(){return e},setBracesSameLine:function(r){e=r},rt:{parse:function(r,e){return(e=e||{}).keepWsc=!0,t(r,e)},stringify:function(r,e){return(e=e||{}).keepWsc=!0,u(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": "1.8.3",
"version": "1.8.4",
"keywords": [

@@ -9,0 +9,0 @@ "json",

@@ -5,2 +5,3 @@ # hjson-js

[![NPM version](https://img.shields.io/npm/v/hjson.svg?style=flat-square)](http://www.npmjs.com/package/hjson)
[![License](https://img.shields.io/github/license/laktak/hjson-js.svg?style=flat-square)](https://github.com/laktak/hjson-js/blob/master/LICENSE)

@@ -7,0 +8,0 @@ [Hjson](http://hjson.org), the Human JSON. A configuration file format for humans. Relaxed syntax, fewer mistakes, more comments.

@@ -9,10 +9,14 @@ {

"trailing2": "test",
"# c1": "test",
"foo # c1 bar": "test",
"// c2": "test",
"foo // c2 bar": "test",
"/* c3 */": "test",
"foo /* c3 */ bar": "test",
"#c1": "test",
"foo#bar": "test",
"//bar": "test",
"foo//bar": "test",
"/*foo*/": "test",
"foo/*foo*/bar": "test",
"/*": "test",
"foo /* bar": "test",
"foo/*bar": "test",
"\"": "test",
"foo\"bar": "test",
"'''": "test",
"foo'''bar": "test",
":": "test",

@@ -27,3 +31,6 @@ "foo:bar": "test",

"]": "test",
"foo]bar": "test"
"foo]bar": "test",
"nl1": "test",
"nl2": "test",
"nl3": "test"
}

@@ -14,4 +14,6 @@ {

"foo2b": "\"asdf\"",
"foo3": "asdf'''",
"foo4": "asdf'''\nasdf",
"foo3a": "asdf'''",
"foo3b": "'''asdf",
"foo4a": "asdf'''\nasdf",
"foo4b": "asdf\n'''asdf",
"arr": [

@@ -18,0 +20,0 @@ "one",

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc