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 2.4.1 to 2.4.2

48

bundle/hjson.js

@@ -0,4 +1,15 @@

/*!
* Hjson v2.4.2
* http://hjson.org
*
* Copyright 2014-2017 Christian Zangl, MIT license
* Details and documentation:
* https://github.com/hjson/hjson-js
*
* This code is based on the the JSON version by Douglas Crockford:
* https://github.com/douglascrockford/JSON-js (json_parse.js, json2.js)
*/
(function(f){if(typeof exports==="object"&&typeof module!=="undefined"){module.exports=f()}else if(typeof define==="function"&&define.amd){define([],f)}else{var g;if(typeof window!=="undefined"){g=window}else if(typeof global!=="undefined"){g=global}else if(typeof self!=="undefined"){g=self}else{g=this}g.Hjson = f()}})(function(){var define,module,exports;return (function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s})({1:[function(require,module,exports){
/* Hjson http://hjson.org */
/* jslint node: true */
"use strict";

@@ -203,3 +214,2 @@

/* Hjson http://hjson.org */
/* jslint node: true */
"use strict";

@@ -315,3 +325,2 @@

/* Hjson http://hjson.org */
/* jslint node: true */
"use strict";

@@ -446,3 +455,2 @@

/* Hjson http://hjson.org */
/* jslint node: true */
"use strict";

@@ -690,7 +698,9 @@

function errorClosingHint(value) {
function search(value, ch) {
function search(value, ch, first) {
var i, k, length, res;
switch (typeof value) {
case 'string':
if (value.indexOf(ch) >= 0) res=value;
if (first) {
if (value[0] === ch) res = value;
} else if (value.indexOf(ch) >= 0) res = value;
break;

@@ -713,11 +723,17 @@ case 'object':

function report(ch) {
var possibleErr=search(value, ch);
var possibleErr=search(value, ch, ch === "'");
if (possibleErr) {
return "found '"+ch+"' in a string value, your mistake could be with:\n"+
" > "+possibleErr+"\n"+
" (unquoted strings contain everything up to the next line!)";
if (ch === "'") {
return "found a string starting with single quotes, your mistake could be with:\n"+
" > "+possibleErr+"\n"+
" (use unquoted or double quoted strings)";
} else {
return "found '"+ch+"' in a string value, your mistake could be with:\n"+
" > "+possibleErr+"\n"+
" (unquoted strings contain everything up to the next line!)";
}
} else return "";
}
return report('}') || report(']');
return report("'") || report('}') || report(']');
}

@@ -887,3 +903,2 @@

/* Hjson http://hjson.org */
/* jslint node: true */
"use strict";

@@ -1222,10 +1237,10 @@

},{"./hjson-common":2,"./hjson-dsf":3}],6:[function(require,module,exports){
module.exports="2.4.1";
module.exports="2.4.2";
},{}],7:[function(require,module,exports){
/*! @preserve
* Hjson v2.4.1
/*!
* Hjson v2.4.2
* http://hjson.org
*
* Copyright 2014-2016 Christian Zangl, MIT license
* Copyright 2014-2017 Christian Zangl, MIT license
* Details and documentation:

@@ -1361,3 +1376,2 @@ * https://github.com/hjson/hjson-js

/*jslint node: true */
"use strict";

@@ -1364,0 +1378,0 @@

@@ -1,6 +0,6 @@

!function(n){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=n();else if("function"==typeof define&&define.amd)define([],n);else{var r;r="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this,r.Hjson=n()}}(function(){return function n(r,e,t){function o(a,u){if(!e[a]){if(!r[a]){var s="function"==typeof require&&require;if(!u&&s)return s(a,!0);if(i)return i(a,!0);var f=new Error("Cannot find module '"+a+"'");throw f.code="MODULE_NOT_FOUND",f}var c=e[a]={exports:{}};r[a][0].call(c.exports,function(n){var e=r[a][1][n];return o(e?e:n)},c,c.exports,n,r,e,t)}return e[a].exports}for(var i="function"==typeof require&&require,a=0;a<t.length;a++)o(t[a]);return o}({1:[function(n,r,e){"use strict";function t(n,r,e){var t;return n&&(t={b:n}),r&&((t=t||{}).a=r),e&&((t=t||{}).x=e),t}function o(n,r){if(null!==n&&"object"==typeof n){var e=p.getComment(n);e&&p.removeComment(n);var i,a,s,f;if("[object Array]"===Object.prototype.toString.apply(n)){for(f={a:[]},i=0,a=n.length;i<a;i++)u(f.a,i,e.a[i],o(n[i]))&&(s=!0);!s&&e.e&&(f.e=t(e.e[0],e.e[1]),s=!0)}else{f={s:{}};var c,l=Object.keys(n);for(e&&e.o?(c=[],e.o.concat(l).forEach(function(r){Object.prototype.hasOwnProperty.call(n,r)&&c.indexOf(r)<0&&c.push(r)})):c=l,f.o=c,i=0,a=c.length;i<a;i++){var m=c[i];u(f.s,m,e.c[m],o(n[m]))&&(s=!0)}!s&&e.e&&(f.e=t(e.e[0],e.e[1]),s=!0)}return r&&e&&e.r&&(f.r=t(e.r[0],e.r[1])),s?f:void 0}}function i(){var n="";return[].forEach.call(arguments,function(r){r&&""!==r.trim()&&(n&&(n+="; "),n+=r.trim())}),n}function a(n,r){var e=[];if(c(n,r,e,[]),e.length>0){var t=l(r,null,1);t+="\n# Orphaned comments:\n",e.forEach(function(n){t+=("# "+n.path.join("/")+": "+i(n.b,n.a,n.e)).replace("\n","\\n ")+"\n"}),l(r,t,1)}}function u(n,r,e,o){var i=t(e?e[0]:void 0,e?e[1]:void 0,o);return i&&(n[r]=i),i}function s(n,r){var e=t(r.b,r.a);return e.path=n,e}function f(n,r,e){if(n){var t,o;if(n.a)for(t=0,o=n.a.length;t<o;t++){var i=e.slice().concat([t]),a=n.a[t];a&&(r.push(s(i,a)),f(a.x,r,i))}else n.o&&n.o.forEach(function(t){var o=e.slice().concat([t]),i=n.s[t];i&&(r.push(s(o,i)),f(i.x,r,o))});n.e&&r.push(s(e,n.e))}}function c(n,r,e,t){if(n){if(null===r||"object"!=typeof r)return void f(n,e,t);var o,i,a=p.createComment(r);if(0===t.length&&n.r&&(a.r=[n.r.b,n.r.a]),"[object Array]"===Object.prototype.toString.apply(r)){for(a.a=[],o=0,i=(n.a||[]).length;o<i;o++){var u=t.slice().concat([o]),l=n.a[o];l&&(o<r.length?(a.a.push([l.b,l.a]),c(l.x,r[o],e,u)):(e.push(s(u,l)),f(l.x,e,u)))}0===o&&n.e&&(a.e=[n.e.b,n.e.a])}else a.c={},a.o=[],(n.o||[]).forEach(function(o){var i=t.slice().concat([o]),u=n.s[o];Object.prototype.hasOwnProperty.call(r,o)?(a.o.push(o),u&&(a.c[o]=[u.b,u.a],c(u.x,r[o],e,i))):u&&(e.push(s(i,u)),f(u.x,e,i))}),n.e&&(a.e=[n.e.b,n.e.a])}}function l(n,r,e){var t=p.createComment(n,p.getComment(n));return t.r||(t.r=["",""]),(r||""===r)&&(t.r[e]=p.forceComment(r)),t.r[e]||""}var p=n("./hjson-common");r.exports={extract:function(n){return o(n,!0)},merge:a,header:function(n,r){return l(n,r,0)},footer:function(n,r){return l(n,r,1)}}},{"./hjson-common":2}],2:[function(n,r,e){"use strict";function t(n,r){function e(){return o=n.charAt(s),s++,o}var t,o,i="",a=0,u=!0,s=0;for(e(),"-"===o&&(i="-",e());o>="0"&&o<="9";)u&&("0"==o?a++:u=!1),i+=o,e();if(u&&a--,"."===o)for(i+=".";e()&&o>="0"&&o<="9";)i+=o;if("e"===o||"E"===o)for(i+=o,e(),"-"!==o&&"+"!==o||(i+=o,e());o>="0"&&o<="9";)i+=o,e();for(;o&&o<=" ";)e();return r&&(","!==o&&"}"!==o&&"]"!==o&&"#"!==o&&("/"!==o||"/"!==n[s]&&"*"!==n[s])||(o=0)),t=+i,o||a||!isFinite(t)?void 0:t}function o(n,r){return Object.defineProperty&&Object.defineProperty(n,"__COMMENTS__",{enumerable:!1,writable:!0}),n.__COMMENTS__=r||{}}function i(n){Object.defineProperty(n,"__COMMENTS__",{value:void 0})}function a(n){return n.__COMMENTS__}function u(n){if(!n)return"";var r,e,t,o,i=n.split("\n");for(t=0;t<i.length;t++)for(r=i[t],o=r.length,e=0;e<o;e++){var a=r[e];if("#"===a)break;if("/"===a&&("/"===r[e+1]||"*"===r[e+1])){"*"===r[e+1]&&(t=i.length);break}if(a>" "){i[t]="# "+r;break}}return i.join("\n")}var s=n("os");r.exports={EOL:s.EOL||"\n",tryParseNumber:t,createComment:o,removeComment:i,getComment:a,forceComment:u}},{os:8}],3:[function(n,r,e){"use strict";function t(n,r){function e(n){return"[object Function]"==={}.toString.call(n)}if("[object Array]"!==Object.prototype.toString.apply(n)){if(n)throw new Error("dsf option must contain an array!");return i}if(0===n.length)return i;var t=[];return n.forEach(function(n){if(!n.name||!e(n.parse)||!e(n.stringify))throw new Error("extension does not match the DSF interface");t.push(function(){try{if("parse"==r)return n.parse.apply(null,arguments);if("stringify"==r){var e=n.stringify.apply(null,arguments);if(void 0!==e&&("string"!=typeof e||0===e.length||'"'===e[0]||[].some.call(e,function(n){return a(n)})))throw new Error("value may not be empty, start with a quote or contain a punctuator character except colon: "+e);return e}throw new Error("Invalid type")}catch(r){throw new Error("DSF-"+n.name+" failed; "+r.message)}})}),o.bind(null,t)}function o(n,r){if(n)for(var e=0;e<n.length;e++){var t=n[e](r);if(void 0!==t)return t}}function i(){}function a(n){return"{"===n||"}"===n||"["===n||"]"===n||","===n}function u(){return{name:"math",parse:function(n){switch(n){case"+inf":case"inf":case"+Inf":case"Inf":return 1/0;case"-inf":case"-Inf":return-(1/0);case"nan":case"NaN":return NaN}},stringify:function(n){if("number"==typeof n)return 1/n===-(1/0)?"-0":n===1/0?"Inf":n===-(1/0)?"-Inf":isNaN(n)?"NaN":void 0}}}function s(n){var r=n&&n.out;return{name:"hex",parse:function(n){if(/^0x[0-9A-Fa-f]+$/.test(n))return parseInt(n,16)},stringify:function(n){if(r&&Number.isInteger(n))return"0x"+n.toString(16)}}}function f(){return{name:"date",parse:function(n){if(/^\d{4}-\d{2}-\d{2}$/.test(n)||/^\d{4}-\d{2}-\d{2}T\d{2}\:\d{2}\:\d{2}(?:.\d+)(?:Z|[+-]\d{2}:\d{2})$/.test(n)){var r=Date.parse(n);if(!isNaN(r))return new Date(r)}},stringify:function(n){if("[object Date]"===Object.prototype.toString.call(n)){var r=n.toISOString();return r.indexOf("T00:00:00.000Z",r.length-14)!==-1?r.substr(0,10):r}}}}u.description="support for Inf/inf, -Inf/-inf, Nan/naN and -0",s.description="parse hexadecimal numbers prefixed with 0x",f.description="support ISO dates",r.exports={loadDsf:t,std:{math:u,hex:s,date:f}}},{}],4:[function(n,r,e){"use strict";r.exports=function(r,e){function t(){w=0,x=" "}function o(n){return"{"===n||"}"===n||"["===n||"]"===n||","===n||":"===n}function i(n){var r,e=0,t=1;for(r=w-1;r>0&&"\n"!==j[r];r--,e++);for(;r>0;r--)"\n"===j[r]&&t++;throw new Error(n+" at line "+t+","+e+" >>>"+j.substr(w-e,20)+" ...")}function a(){return x=j.charAt(w),w++,x}function u(n){return j.charAt(w+n)}function s(){var n="";if('"'===x)for(;a();){if('"'===x)return a(),n;if("\\"===x)if(a(),"u"===x){for(var r=0,e=0;e<4;e++){a();var t,o=x.charCodeAt(0);x>="0"&&x<="9"?t=o-48:x>="a"&&x<="f"?t=o-97+10:x>="A"&&x<="F"?t=o-65+10:i("Bad \\u char "+x),r=16*r+t}n+=String.fromCharCode(r)}else{if("string"!=typeof q[x])break;n+=q[x]}else n+=x}i("Bad string")}function f(){function n(){for(var n=t;x&&x<=" "&&"\n"!==x&&n-- >0;)a()}for(var r="",e=0,t=0;;){var o=u(-t-5);if(!o||"\n"===o)break;t++}for(;x&&x<=" "&&"\n"!==x;)a();for("\n"===x&&(a(),n());;){if(x){if("'"===x){if(e++,a(),3===e)return"\n"===r.slice(-1)&&(r=r.slice(0,-1)),r;continue}for(;e>0;)r+="'",e--}else i("Bad multiline string");"\n"===x?(r+="\n",a(),n()):("\r"!==x&&(r+=x),a())}}function c(){if('"'===x)return s();for(var n="",r=w,e=-1;;){if(":"===x)return n?e>=0&&e!==n.length&&(w=r+e,i("Found whitespace in your key name (use quotes to include)")):i("Found ':' but no key name (for an empty key name use quotes)"),n;x<=" "?x?e<0&&(e=n.length):i("Found EOF while looking for a key name (check your syntax)"):o(x)?i("Found '"+x+"' where a key name was expected (check your syntax or use quotes if the key name includes {}[],: or whitespace)"):n+=x,a()}}function l(){for(;x;){for(;x&&x<=" ";)a();if("#"===x||"/"===x&&"/"===u(0))for(;x&&"\n"!==x;)a();else{if("/"!==x||"*"!==u(0))break;for(a(),a();x&&("*"!==x||"/"!==u(0));)a();x&&(a(),a())}}}function p(){var n=x;for(o(x)&&i("Found a punctuator character '"+x+"' when expecting a quoteless string (check your syntax)");;){if(a(),3===n.length&&"'''"===n)return f();var r="\r"===x||"\n"===x||""===x;if(r||","===x||"}"===x||"]"===x||"#"===x||"/"===x&&("/"===u(0)||"*"===u(0))){var e=n[0];switch(e){case"f":if("false"===n.trim())return!1;break;case"n":if("null"===n.trim())return null;break;case"t":if("true"===n.trim())return!0;break;default:if("-"===e||e>="0"&&e<="9"){var t=E.tryParseNumber(n);if(void 0!==t)return t}}if(r){n=n.trim();var s=k(n);return void 0!==s?s:n}}n+=x}}function m(n,r){var e;for(n--,e=w-2;e>n&&j[e]<=" "&&"\n"!==j[e];e--);"\n"===j[e]&&e--,"\r"===j[e]&&e--;var t=j.substr(n,e-n+1);for(e=0;e<t.length;e++)if(t[e]>" "){var o=t.indexOf("\n");if(o>=0){var i=[t.substr(0,o),t.substr(o+1)];return r&&0===i[0].trim().length&&i.shift(),i}return[t]}return[]}function h(n){function r(n,e){var t,o,i,a;switch(typeof n){case"string":n.indexOf(e)>=0&&(a=n);break;case"object":if("[object Array]"===Object.prototype.toString.apply(n))for(t=0,i=n.length;t<i;t++)a=r(n[t],e)||a;else for(o in n)Object.prototype.hasOwnProperty.call(n,o)&&(a=r(n[o],e)||a)}return a}function e(e){var t=r(n,e);return t?"found '"+e+"' in a string value, your mistake could be with:\n > "+t+"\n (unquoted strings contain everything up to the next line!)":""}return e("}")||e("]")}function d(){var n,r,e,t=[];try{if(O&&(n=E.createComment(t,{a:[]})),a(),r=w,l(),n&&(e=m(r,!0).join("\n")),"]"===x)return a(),n&&(n.e=[e]),t;for(;x;){if(t.push(v()),r=w,l(),","===x&&(a(),r=w,l()),n){var o=m(r);n.a.push([e||"",o[0]||""]),e=o[1]}if("]"===x)return a(),n&&(n.a[n.a.length-1][1]+=e||""),t;l()}i("End of input while parsing an array (missing ']')")}catch(n){throw n.hint=n.hint||h(t),n}}function y(n){var r,e,t,o="",u={};try{if(O&&(r=E.createComment(u,{c:{},o:[]})),n?e=1:(a(),e=w),l(),r&&(t=m(e,!0).join("\n")),"}"===x&&!n)return r&&(r.e=[t]),a(),u;for(;x;){if(o=c(),l(),":"!==x&&i("Expected ':' instead of '"+x+"'"),a(),u[o]=v(),e=w,l(),","===x&&(a(),e=w,l()),r){var s=m(e);r.c[o]=[t||"",s[0]||""],t=s[1],r.o.push(o)}if("}"===x&&!n)return a(),r&&(r.c[o][1]+=t||""),u;l()}if(n)return u;i("End of input while parsing an object (missing '}')")}catch(n){throw n.hint=n.hint||h(u),n}}function v(){switch(l(),x){case"{":return y();case"[":return d();case'"':return s();default:return p()}}function g(n,r){var e=w;if(l(),x&&i("Syntax error, found trailing characters"),O){var t=r.join("\n"),o=m(e).join("\n");if(o||t){var a=E.createComment(n,E.getComment(n));a.r=[t,o]}}return n}function b(){l();var n=O?m(1):null;switch(x){case"{":return g(y(),n);case"[":return g(d(),n)}try{return g(y(!0),n)}catch(r){t();try{return g(v(),n)}catch(n){throw r}}}var j,w,x,O,k,E=n("./hjson-common"),C=n("./hjson-dsf"),q={'"':'"',"\\":"\\","/":"/",b:"\b",f:"\f",n:"\n",r:"\r",t:"\t"};if("string"!=typeof r)throw new Error("source is not a string");var S=null;return e&&"object"==typeof e&&(O=e.keepWsc,S=e.dsf),k=C.loadDsf(S,"parse"),j=r,t(),b()}},{"./hjson-common":2,"./hjson-dsf":3}],5:[function(n,r,e){"use strict";r.exports=function(r,e){function t(n,r){return n[0]+r+n[1]}function o(n){return n.replace(O,function(n){var r=q[n];return"string"==typeof r?t(j.esc,r):t(j.uni,("0000"+n.charCodeAt(0).toString(16)).slice(-4))})}function i(n,r,e,i){return n?(k.lastIndex=0,C.lastIndex=0,y||e||k.test(n)||void 0!==f.tryParseNumber(n,!0)||C.test(n)?(O.lastIndex=0,E.lastIndex=0,O.test(n)?E.test(n)||i||!v?t(j.qstr,o(n)):a(n,r):t(j.qstr,n)):t(j.str,n)):t(j.qstr,"")}function a(n,r){var e,o=n.replace(/\r/g,"").split("\n");if(r+=p,1===o.length)return t(j.mstr,o[0]);var i=l+r+j.mstr[0];for(e=0;e<o.length;e++)i+=l,o[e]&&(i+=r+o[e]);return i+l+r+j.mstr[1]}function u(n){return n?d||S.test(n)?(O.lastIndex=0,t(j.qkey,O.test(n)?o(n):n)):t(j.key,n):'""'}function s(n,r,e,o){function a(n){return n&&"\n"===n["\r"===n[0]?1:0]}function c(n){return n&&!a(n)}function d(n,r,e){if(!n)return"";n=f.forceComment(n);var o,i=n.length;for(o=0;o<i&&n[o]<=" ";o++);return e&&o>0&&(n=n.substr(o)),o<i?r+t(j.rem,n):n}var y=w(n);if(void 0!==y)return t(j.dsf,y);switch(typeof n){case"string":return i(n,N,r,o);case"number":return isFinite(n)?t(j.num,String(n)):t(j.lit,"null");case"boolean":return t(j.lit,String(n));case"object":if(!n)return t(j.lit,"null");var v;m&&(v=f.getComment(n));var b="[object Array]"===Object.prototype.toString.apply(n),x=N;N+=p;var O,k,E,C,q,S,_=l+x,I=l+N,F=e||h?"":_,A=[];if(b){for(O=0,k=n.length;O<k;O++)v&&(q=v.a[O]||[],S=c(q[1]),A.push(d(q[0],"\n")+I)),A.push(s(n[O],!!v&&S,!0)+(O<k-1?g:"")||t(j.lit,"null")),v&&q[1]&&A.push(d(q[1],S?" ":"\n",S));v&&(0===k?A.push((v.e?d(v.e[0],"\n"):"")+_):A.push(_)),C=v?F+t(j.arr,A.join("")):0===A.length?t(j.arr,""):F+t(j.arr,I+A.join(I)+_)}else{var P;if(v){P=v.o.slice();for(E in n)Object.prototype.hasOwnProperty.call(n,E)&&P.indexOf(E)<0&&P.push(E);for(O=0,k=P.length;O<k;O++)E=P[O],q=v.c[E]||[],S=c(q[1]),A.push(d(q[0],"\n")+I),C=s(n[E],S),C&&A.push(u(E)+j.col+(a(C)?"":" ")+C+(O<k-1?g:"")),v&&q[1]&&A.push(d(q[1],S?" ":"\n",S));0===k?A.push((v.e?d(v.e[0],"\n"):"")+_):A.push(_)}else for(P=Object.keys(n),O=0,k=P.length;O<k;O++)E=P[O],Object.prototype.hasOwnProperty.call(n,E)&&(C=s(n[E]),C&&A.push(u(E)+j.col+(a(C)?"":" ")+C+(O<k-1?g:"")));C=0===A.length?t(j.obj,""):v?F+t(j.obj,A.join("")):F+t(j.obj,I+A.join(I)+_)}return N=x,C}}var f=n("./hjson-common"),c=n("./hjson-dsf"),l=f.EOL,p=" ",m=!1,h=!1,d=!1,y=!1,v=1,g="",b=null,j={obj:["{","}"],arr:["[","]"],key:["",""],qkey:['"','"'],col:[":"],str:["",""],qstr:['"','"'],mstr:["'''","'''"],num:["",""],lit:["",""],dsf:["",""],esc:["\\",""],uni:["\\u",""],rem:["",""]};e&&"object"==typeof e&&(e.quotes="always"===e.quotes?"strings":e.quotes,"\n"!==e.eol&&"\r\n"!==e.eol||(l=e.eol),m=e.keepWsc,h=e.bracesSameLine,d="all"===e.quotes||"keys"===e.quotes,y="all"===e.quotes||"strings"===e.quotes||e.separator===!0,v=y||"off"==e.multiline?0:"no-tabs"==e.multiline?2:1,g=e.separator===!0?",":"",b=e.dsf,"number"==typeof e.space?p=new Array(e.space+1).join(" "):"string"==typeof e.space&&(p=e.space),e.colors===!0&&(j={obj:["{","}"],arr:["[","]"],key:["",""],qkey:['"','"'],col:[":"],str:["",""],qstr:['"','"'],mstr:["'''","'''"],num:["",""],lit:["",""],dsf:["",""],esc:["\\",""],uni:["\\u",""],rem:["",""]}));var w,x="-Ÿ­؀-؄܏឴឵‌-‏\u2028- ⁠-\ufeff￰-￿",O=new RegExp('[\\\\\\"\0-'+x+"]","g"),k=new RegExp("^\\s|^\"|^'''|^#|^\\/\\*|^\\/\\/|^\\{|^\\}|^\\[|^\\]|^:|^,|\\s$|[\0-"+x+"]","g"),E=new RegExp("'''|^[\\s]+$|[\0-"+(2===v?"\t":"\b")+"\v\f-"+x+"]","g"),C=new RegExp("^(true|false|null)\\s*((,|\\]|\\}|#|//|/\\*).*)?$"),q={"\b":"b","\t":"t","\n":"n","\f":"f","\r":"r",'"':'"',"\\":"\\"},S=/[,\{\[\}\]\s:#"]|\/\/|\/\*|'''/,N="";w=c.loadDsf(b,"stringify");var _="",I=m?I=(f.getComment(r)||{}).r:null;return I&&I[0]&&(_=I[0]+"\n"),_+=s(r,null,!0,!0),I&&(_+=I[1]||""),_}},{"./hjson-common":2,"./hjson-dsf":3}],6:[function(n,r,e){r.exports="2.4.1"},{}],7:[function(n,r,e){/*! @preserve
* Hjson v2.4.1
/*!
* Hjson v2.4.2
* http://hjson.org
*
* Copyright 2014-2016 Christian Zangl, MIT license
* Copyright 2014-2017 Christian Zangl, MIT license
* Details and documentation:

@@ -12,2 +12,13 @@ * https://github.com/hjson/hjson-js

*/
!function(n){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=n();else if("function"==typeof define&&define.amd)define([],n);else{var r;r="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this,r.Hjson=n()}}(function(){return function n(r,e,t){function o(a,u){if(!e[a]){if(!r[a]){var s="function"==typeof require&&require;if(!u&&s)return s(a,!0);if(i)return i(a,!0);var f=new Error("Cannot find module '"+a+"'");throw f.code="MODULE_NOT_FOUND",f}var c=e[a]={exports:{}};r[a][0].call(c.exports,function(n){var e=r[a][1][n];return o(e?e:n)},c,c.exports,n,r,e,t)}return e[a].exports}for(var i="function"==typeof require&&require,a=0;a<t.length;a++)o(t[a]);return o}({1:[function(n,r,e){"use strict";function t(n,r,e){var t;return n&&(t={b:n}),r&&((t=t||{}).a=r),e&&((t=t||{}).x=e),t}function o(n,r){if(null!==n&&"object"==typeof n){var e=p.getComment(n);e&&p.removeComment(n);var i,a,s,f;if("[object Array]"===Object.prototype.toString.apply(n)){for(f={a:[]},i=0,a=n.length;i<a;i++)u(f.a,i,e.a[i],o(n[i]))&&(s=!0);!s&&e.e&&(f.e=t(e.e[0],e.e[1]),s=!0)}else{f={s:{}};var c,l=Object.keys(n);for(e&&e.o?(c=[],e.o.concat(l).forEach(function(r){Object.prototype.hasOwnProperty.call(n,r)&&c.indexOf(r)<0&&c.push(r)})):c=l,f.o=c,i=0,a=c.length;i<a;i++){var h=c[i];u(f.s,h,e.c[h],o(n[h]))&&(s=!0)}!s&&e.e&&(f.e=t(e.e[0],e.e[1]),s=!0)}return r&&e&&e.r&&(f.r=t(e.r[0],e.r[1])),s?f:void 0}}function i(){var n="";return[].forEach.call(arguments,function(r){r&&""!==r.trim()&&(n&&(n+="; "),n+=r.trim())}),n}function a(n,r){var e=[];if(c(n,r,e,[]),e.length>0){var t=l(r,null,1);t+="\n# Orphaned comments:\n",e.forEach(function(n){t+=("# "+n.path.join("/")+": "+i(n.b,n.a,n.e)).replace("\n","\\n ")+"\n"}),l(r,t,1)}}function u(n,r,e,o){var i=t(e?e[0]:void 0,e?e[1]:void 0,o);return i&&(n[r]=i),i}function s(n,r){var e=t(r.b,r.a);return e.path=n,e}function f(n,r,e){if(n){var t,o;if(n.a)for(t=0,o=n.a.length;t<o;t++){var i=e.slice().concat([t]),a=n.a[t];a&&(r.push(s(i,a)),f(a.x,r,i))}else n.o&&n.o.forEach(function(t){var o=e.slice().concat([t]),i=n.s[t];i&&(r.push(s(o,i)),f(i.x,r,o))});n.e&&r.push(s(e,n.e))}}function c(n,r,e,t){if(n){if(null===r||"object"!=typeof r)return void f(n,e,t);var o,i,a=p.createComment(r);if(0===t.length&&n.r&&(a.r=[n.r.b,n.r.a]),"[object Array]"===Object.prototype.toString.apply(r)){for(a.a=[],o=0,i=(n.a||[]).length;o<i;o++){var u=t.slice().concat([o]),l=n.a[o];l&&(o<r.length?(a.a.push([l.b,l.a]),c(l.x,r[o],e,u)):(e.push(s(u,l)),f(l.x,e,u)))}0===o&&n.e&&(a.e=[n.e.b,n.e.a])}else a.c={},a.o=[],(n.o||[]).forEach(function(o){var i=t.slice().concat([o]),u=n.s[o];Object.prototype.hasOwnProperty.call(r,o)?(a.o.push(o),u&&(a.c[o]=[u.b,u.a],c(u.x,r[o],e,i))):u&&(e.push(s(i,u)),f(u.x,e,i))}),n.e&&(a.e=[n.e.b,n.e.a])}}function l(n,r,e){var t=p.createComment(n,p.getComment(n));return t.r||(t.r=["",""]),(r||""===r)&&(t.r[e]=p.forceComment(r)),t.r[e]||""}var p=n("./hjson-common");r.exports={extract:function(n){return o(n,!0)},merge:a,header:function(n,r){return l(n,r,0)},footer:function(n,r){return l(n,r,1)}}},{"./hjson-common":2}],2:[function(n,r,e){"use strict";function t(n,r){function e(){return o=n.charAt(s),s++,o}var t,o,i="",a=0,u=!0,s=0;for(e(),"-"===o&&(i="-",e());o>="0"&&o<="9";)u&&("0"==o?a++:u=!1),i+=o,e();if(u&&a--,"."===o)for(i+=".";e()&&o>="0"&&o<="9";)i+=o;if("e"===o||"E"===o)for(i+=o,e(),"-"!==o&&"+"!==o||(i+=o,e());o>="0"&&o<="9";)i+=o,e();for(;o&&o<=" ";)e();return r&&(","!==o&&"}"!==o&&"]"!==o&&"#"!==o&&("/"!==o||"/"!==n[s]&&"*"!==n[s])||(o=0)),t=+i,o||a||!isFinite(t)?void 0:t}function o(n,r){return Object.defineProperty&&Object.defineProperty(n,"__COMMENTS__",{enumerable:!1,writable:!0}),n.__COMMENTS__=r||{}}function i(n){Object.defineProperty(n,"__COMMENTS__",{value:void 0})}function a(n){return n.__COMMENTS__}function u(n){if(!n)return"";var r,e,t,o,i=n.split("\n");for(t=0;t<i.length;t++)for(r=i[t],o=r.length,e=0;e<o;e++){var a=r[e];if("#"===a)break;if("/"===a&&("/"===r[e+1]||"*"===r[e+1])){"*"===r[e+1]&&(t=i.length);break}if(a>" "){i[t]="# "+r;break}}return i.join("\n")}var s=n("os");r.exports={EOL:s.EOL||"\n",tryParseNumber:t,createComment:o,removeComment:i,getComment:a,forceComment:u}},{os:8}],3:[function(n,r,e){"use strict";function t(n,r){function e(n){return"[object Function]"==={}.toString.call(n)}if("[object Array]"!==Object.prototype.toString.apply(n)){if(n)throw new Error("dsf option must contain an array!");return i}if(0===n.length)return i;var t=[];return n.forEach(function(n){if(!n.name||!e(n.parse)||!e(n.stringify))throw new Error("extension does not match the DSF interface");t.push(function(){try{if("parse"==r)return n.parse.apply(null,arguments);if("stringify"==r){var e=n.stringify.apply(null,arguments);if(void 0!==e&&("string"!=typeof e||0===e.length||'"'===e[0]||[].some.call(e,function(n){return a(n)})))throw new Error("value may not be empty, start with a quote or contain a punctuator character except colon: "+e);return e}throw new Error("Invalid type")}catch(r){throw new Error("DSF-"+n.name+" failed; "+r.message)}})}),o.bind(null,t)}function o(n,r){if(n)for(var e=0;e<n.length;e++){var t=n[e](r);if(void 0!==t)return t}}function i(){}function a(n){return"{"===n||"}"===n||"["===n||"]"===n||","===n}function u(){return{name:"math",parse:function(n){switch(n){case"+inf":case"inf":case"+Inf":case"Inf":return 1/0;case"-inf":case"-Inf":return-(1/0);case"nan":case"NaN":return NaN}},stringify:function(n){if("number"==typeof n)return 1/n===-(1/0)?"-0":n===1/0?"Inf":n===-(1/0)?"-Inf":isNaN(n)?"NaN":void 0}}}function s(n){var r=n&&n.out;return{name:"hex",parse:function(n){if(/^0x[0-9A-Fa-f]+$/.test(n))return parseInt(n,16)},stringify:function(n){if(r&&Number.isInteger(n))return"0x"+n.toString(16)}}}function f(){return{name:"date",parse:function(n){if(/^\d{4}-\d{2}-\d{2}$/.test(n)||/^\d{4}-\d{2}-\d{2}T\d{2}\:\d{2}\:\d{2}(?:.\d+)(?:Z|[+-]\d{2}:\d{2})$/.test(n)){var r=Date.parse(n);if(!isNaN(r))return new Date(r)}},stringify:function(n){if("[object Date]"===Object.prototype.toString.call(n)){var r=n.toISOString();return r.indexOf("T00:00:00.000Z",r.length-14)!==-1?r.substr(0,10):r}}}}u.description="support for Inf/inf, -Inf/-inf, Nan/naN and -0",s.description="parse hexadecimal numbers prefixed with 0x",f.description="support ISO dates",r.exports={loadDsf:t,std:{math:u,hex:s,date:f}}},{}],4:[function(n,r,e){"use strict";r.exports=function(r,e){function t(){w=0,x=" "}function o(n){return"{"===n||"}"===n||"["===n||"]"===n||","===n||":"===n}function i(n){var r,e=0,t=1;for(r=w-1;r>0&&"\n"!==j[r];r--,e++);for(;r>0;r--)"\n"===j[r]&&t++;throw new Error(n+" at line "+t+","+e+" >>>"+j.substr(w-e,20)+" ...")}function a(){return x=j.charAt(w),w++,x}function u(n){return j.charAt(w+n)}function s(){var n="";if('"'===x)for(;a();){if('"'===x)return a(),n;if("\\"===x)if(a(),"u"===x){for(var r=0,e=0;e<4;e++){a();var t,o=x.charCodeAt(0);x>="0"&&x<="9"?t=o-48:x>="a"&&x<="f"?t=o-97+10:x>="A"&&x<="F"?t=o-65+10:i("Bad \\u char "+x),r=16*r+t}n+=String.fromCharCode(r)}else{if("string"!=typeof C[x])break;n+=C[x]}else n+=x}i("Bad string")}function f(){function n(){for(var n=t;x&&x<=" "&&"\n"!==x&&n-- >0;)a()}for(var r="",e=0,t=0;;){var o=u(-t-5);if(!o||"\n"===o)break;t++}for(;x&&x<=" "&&"\n"!==x;)a();for("\n"===x&&(a(),n());;){if(x){if("'"===x){if(e++,a(),3===e)return"\n"===r.slice(-1)&&(r=r.slice(0,-1)),r;continue}for(;e>0;)r+="'",e--}else i("Bad multiline string");"\n"===x?(r+="\n",a(),n()):("\r"!==x&&(r+=x),a())}}function c(){if('"'===x)return s();for(var n="",r=w,e=-1;;){if(":"===x)return n?e>=0&&e!==n.length&&(w=r+e,i("Found whitespace in your key name (use quotes to include)")):i("Found ':' but no key name (for an empty key name use quotes)"),n;x<=" "?x?e<0&&(e=n.length):i("Found EOF while looking for a key name (check your syntax)"):o(x)?i("Found '"+x+"' where a key name was expected (check your syntax or use quotes if the key name includes {}[],: or whitespace)"):n+=x,a()}}function l(){for(;x;){for(;x&&x<=" ";)a();if("#"===x||"/"===x&&"/"===u(0))for(;x&&"\n"!==x;)a();else{if("/"!==x||"*"!==u(0))break;for(a(),a();x&&("*"!==x||"/"!==u(0));)a();x&&(a(),a())}}}function p(){var n=x;for(o(x)&&i("Found a punctuator character '"+x+"' when expecting a quoteless string (check your syntax)");;){if(a(),3===n.length&&"'''"===n)return f();var r="\r"===x||"\n"===x||""===x;if(r||","===x||"}"===x||"]"===x||"#"===x||"/"===x&&("/"===u(0)||"*"===u(0))){var e=n[0];switch(e){case"f":if("false"===n.trim())return!1;break;case"n":if("null"===n.trim())return null;break;case"t":if("true"===n.trim())return!0;break;default:if("-"===e||e>="0"&&e<="9"){var t=E.tryParseNumber(n);if(void 0!==t)return t}}if(r){n=n.trim();var s=k(n);return void 0!==s?s:n}}n+=x}}function h(n,r){var e;for(n--,e=w-2;e>n&&j[e]<=" "&&"\n"!==j[e];e--);"\n"===j[e]&&e--,"\r"===j[e]&&e--;var t=j.substr(n,e-n+1);for(e=0;e<t.length;e++)if(t[e]>" "){var o=t.indexOf("\n");if(o>=0){var i=[t.substr(0,o),t.substr(o+1)];return r&&0===i[0].trim().length&&i.shift(),i}return[t]}return[]}function m(n){function r(n,e,t){var o,i,a,u;switch(typeof n){case"string":t?n[0]===e&&(u=n):n.indexOf(e)>=0&&(u=n);break;case"object":if("[object Array]"===Object.prototype.toString.apply(n))for(o=0,a=n.length;o<a;o++)u=r(n[o],e)||u;else for(i in n)Object.prototype.hasOwnProperty.call(n,i)&&(u=r(n[i],e)||u)}return u}function e(e){var t=r(n,e,"'"===e);return t?"'"===e?"found a string starting with single quotes, your mistake could be with:\n > "+t+"\n (use unquoted or double quoted strings)":"found '"+e+"' in a string value, your mistake could be with:\n > "+t+"\n (unquoted strings contain everything up to the next line!)":""}return e("'")||e("}")||e("]")}function d(){var n,r,e,t=[];try{if(O&&(n=E.createComment(t,{a:[]})),a(),r=w,l(),n&&(e=h(r,!0).join("\n")),"]"===x)return a(),n&&(n.e=[e]),t;for(;x;){if(t.push(v()),r=w,l(),","===x&&(a(),r=w,l()),n){var o=h(r);n.a.push([e||"",o[0]||""]),e=o[1]}if("]"===x)return a(),n&&(n.a[n.a.length-1][1]+=e||""),t;l()}i("End of input while parsing an array (missing ']')")}catch(n){throw n.hint=n.hint||m(t),n}}function y(n){var r,e,t,o="",u={};try{if(O&&(r=E.createComment(u,{c:{},o:[]})),n?e=1:(a(),e=w),l(),r&&(t=h(e,!0).join("\n")),"}"===x&&!n)return r&&(r.e=[t]),a(),u;for(;x;){if(o=c(),l(),":"!==x&&i("Expected ':' instead of '"+x+"'"),a(),u[o]=v(),e=w,l(),","===x&&(a(),e=w,l()),r){var s=h(e);r.c[o]=[t||"",s[0]||""],t=s[1],r.o.push(o)}if("}"===x&&!n)return a(),r&&(r.c[o][1]+=t||""),u;l()}if(n)return u;i("End of input while parsing an object (missing '}')")}catch(n){throw n.hint=n.hint||m(u),n}}function v(){switch(l(),x){case"{":return y();case"[":return d();case'"':return s();default:return p()}}function g(n,r){var e=w;if(l(),x&&i("Syntax error, found trailing characters"),O){var t=r.join("\n"),o=h(e).join("\n");if(o||t){var a=E.createComment(n,E.getComment(n));a.r=[t,o]}}return n}function b(){l();var n=O?h(1):null;switch(x){case"{":return g(y(),n);case"[":return g(d(),n)}try{return g(y(!0),n)}catch(r){t();try{return g(v(),n)}catch(n){throw r}}}var j,w,x,O,k,E=n("./hjson-common"),q=n("./hjson-dsf"),C={'"':'"',"\\":"\\","/":"/",b:"\b",f:"\f",n:"\n",r:"\r",t:"\t"};if("string"!=typeof r)throw new Error("source is not a string");var S=null;return e&&"object"==typeof e&&(O=e.keepWsc,S=e.dsf),k=q.loadDsf(S,"parse"),j=r,t(),b()}},{"./hjson-common":2,"./hjson-dsf":3}],5:[function(n,r,e){"use strict";r.exports=function(r,e){function t(n,r){return n[0]+r+n[1]}function o(n){return n.replace(O,function(n){var r=C[n];return"string"==typeof r?t(j.esc,r):t(j.uni,("0000"+n.charCodeAt(0).toString(16)).slice(-4))})}function i(n,r,e,i){return n?(k.lastIndex=0,q.lastIndex=0,y||e||k.test(n)||void 0!==f.tryParseNumber(n,!0)||q.test(n)?(O.lastIndex=0,E.lastIndex=0,O.test(n)?E.test(n)||i||!v?t(j.qstr,o(n)):a(n,r):t(j.qstr,n)):t(j.str,n)):t(j.qstr,"")}function a(n,r){var e,o=n.replace(/\r/g,"").split("\n");if(r+=p,1===o.length)return t(j.mstr,o[0]);var i=l+r+j.mstr[0];for(e=0;e<o.length;e++)i+=l,o[e]&&(i+=r+o[e]);return i+l+r+j.mstr[1]}function u(n){return n?d||S.test(n)?(O.lastIndex=0,t(j.qkey,O.test(n)?o(n):n)):t(j.key,n):'""'}function s(n,r,e,o){function a(n){return n&&"\n"===n["\r"===n[0]?1:0]}function c(n){return n&&!a(n)}function d(n,r,e){if(!n)return"";n=f.forceComment(n);var o,i=n.length;for(o=0;o<i&&n[o]<=" ";o++);return e&&o>0&&(n=n.substr(o)),o<i?r+t(j.rem,n):n}var y=w(n);if(void 0!==y)return t(j.dsf,y);switch(typeof n){case"string":return i(n,N,r,o);case"number":return isFinite(n)?t(j.num,String(n)):t(j.lit,"null");case"boolean":return t(j.lit,String(n));case"object":if(!n)return t(j.lit,"null");var v;h&&(v=f.getComment(n));var b="[object Array]"===Object.prototype.toString.apply(n),x=N;N+=p;var O,k,E,q,C,S,_=l+x,I=l+N,F=e||m?"":_,A=[];if(b){for(O=0,k=n.length;O<k;O++)v&&(C=v.a[O]||[],S=c(C[1]),A.push(d(C[0],"\n")+I)),A.push(s(n[O],!!v&&S,!0)+(O<k-1?g:"")||t(j.lit,"null")),v&&C[1]&&A.push(d(C[1],S?" ":"\n",S));v&&(0===k?A.push((v.e?d(v.e[0],"\n"):"")+_):A.push(_)),q=v?F+t(j.arr,A.join("")):0===A.length?t(j.arr,""):F+t(j.arr,I+A.join(I)+_)}else{var P;if(v){P=v.o.slice();for(E in n)Object.prototype.hasOwnProperty.call(n,E)&&P.indexOf(E)<0&&P.push(E);for(O=0,k=P.length;O<k;O++)E=P[O],C=v.c[E]||[],S=c(C[1]),A.push(d(C[0],"\n")+I),q=s(n[E],S),q&&A.push(u(E)+j.col+(a(q)?"":" ")+q+(O<k-1?g:"")),v&&C[1]&&A.push(d(C[1],S?" ":"\n",S));0===k?A.push((v.e?d(v.e[0],"\n"):"")+_):A.push(_)}else for(P=Object.keys(n),O=0,k=P.length;O<k;O++)E=P[O],Object.prototype.hasOwnProperty.call(n,E)&&(q=s(n[E]),q&&A.push(u(E)+j.col+(a(q)?"":" ")+q+(O<k-1?g:"")));q=0===A.length?t(j.obj,""):v?F+t(j.obj,A.join("")):F+t(j.obj,I+A.join(I)+_)}return N=x,q}}var f=n("./hjson-common"),c=n("./hjson-dsf"),l=f.EOL,p=" ",h=!1,m=!1,d=!1,y=!1,v=1,g="",b=null,j={obj:["{","}"],arr:["[","]"],key:["",""],qkey:['"','"'],col:[":"],str:["",""],qstr:['"','"'],mstr:["'''","'''"],num:["",""],lit:["",""],dsf:["",""],esc:["\\",""],uni:["\\u",""],rem:["",""]};e&&"object"==typeof e&&(e.quotes="always"===e.quotes?"strings":e.quotes,"\n"!==e.eol&&"\r\n"!==e.eol||(l=e.eol),h=e.keepWsc,m=e.bracesSameLine,d="all"===e.quotes||"keys"===e.quotes,y="all"===e.quotes||"strings"===e.quotes||e.separator===!0,v=y||"off"==e.multiline?0:"no-tabs"==e.multiline?2:1,g=e.separator===!0?",":"",b=e.dsf,"number"==typeof e.space?p=new Array(e.space+1).join(" "):"string"==typeof e.space&&(p=e.space),e.colors===!0&&(j={obj:["{","}"],arr:["[","]"],key:["",""],qkey:['"','"'],col:[":"],str:["",""],qstr:['"','"'],mstr:["'''","'''"],num:["",""],lit:["",""],dsf:["",""],esc:["\\",""],uni:["\\u",""],rem:["",""]}));var w,x="-Ÿ­؀-؄܏឴឵‌-‏\u2028- ⁠-\ufeff￰-￿",O=new RegExp('[\\\\\\"\0-'+x+"]","g"),k=new RegExp("^\\s|^\"|^'''|^#|^\\/\\*|^\\/\\/|^\\{|^\\}|^\\[|^\\]|^:|^,|\\s$|[\0-"+x+"]","g"),E=new RegExp("'''|^[\\s]+$|[\0-"+(2===v?"\t":"\b")+"\v\f-"+x+"]","g"),q=new RegExp("^(true|false|null)\\s*((,|\\]|\\}|#|//|/\\*).*)?$"),C={"\b":"b","\t":"t","\n":"n","\f":"f","\r":"r",'"':'"',"\\":"\\"},S=/[,\{\[\}\]\s:#"]|\/\/|\/\*|'''/,N="";w=c.loadDsf(b,"stringify");var _="",I=h?I=(f.getComment(r)||{}).r:null;return I&&I[0]&&(_=I[0]+"\n"),_+=s(r,null,!0,!0),I&&(_+=I[1]||""),_}},{"./hjson-common":2,"./hjson-dsf":3}],6:[function(n,r,e){r.exports="2.4.2"},{}],7:[function(n,r,e){/*!
* Hjson v2.4.2
* http://hjson.org
*
* Copyright 2014-2017 Christian Zangl, MIT license
* Details and documentation:
* https://github.com/hjson/hjson-js
*
* This code is based on the the JSON version by Douglas Crockford:
* https://github.com/douglascrockford/JSON-js (json_parse.js, json2.js)
*/
"use strict";var t=n("./hjson-common"),o=n("./hjson-version"),i=n("./hjson-parse"),a=n("./hjson-stringify"),u=n("./hjson-comments"),s=n("./hjson-dsf");r.exports={parse:i,stringify:a,endOfLine:function(){return t.EOL},setEndOfLine:function(n){"\n"!==n&&"\r\n"!==n||(t.EOL=n)},version:o,rt:{parse:function(n,r){return(r=r||{}).keepWsc=!0,i(n,r)},stringify:function(n,r){return(r=r||{}).keepWsc=!0,a(n,r)}},comments:u,dsf:s.std}},{"./hjson-comments":1,"./hjson-common":2,"./hjson-dsf":3,"./hjson-parse":4,"./hjson-stringify":5,"./hjson-version":6}],8:[function(n,r,e){},{}]},{},[7])(7)});
# hjson-js History
- v2.4.2
- add error hint for incorrect single quotes
- v2.4.1

@@ -4,0 +6,0 @@ - fix tty colors

/* Hjson http://hjson.org */
/* jslint node: true */
"use strict";

@@ -4,0 +3,0 @@

/* Hjson http://hjson.org */
/* jslint node: true */
"use strict";

@@ -4,0 +3,0 @@

/* Hjson http://hjson.org */
/* jslint node: true */
"use strict";

@@ -4,0 +3,0 @@

/* Hjson http://hjson.org */
/* jslint node: true */
"use strict";

@@ -245,7 +244,9 @@

function errorClosingHint(value) {
function search(value, ch) {
function search(value, ch, first) {
var i, k, length, res;
switch (typeof value) {
case 'string':
if (value.indexOf(ch) >= 0) res=value;
if (first) {
if (value[0] === ch) res = value;
} else if (value.indexOf(ch) >= 0) res = value;
break;

@@ -268,11 +269,17 @@ case 'object':

function report(ch) {
var possibleErr=search(value, ch);
var possibleErr=search(value, ch, ch === "'");
if (possibleErr) {
return "found '"+ch+"' in a string value, your mistake could be with:\n"+
" > "+possibleErr+"\n"+
" (unquoted strings contain everything up to the next line!)";
if (ch === "'") {
return "found a string starting with single quotes, your mistake could be with:\n"+
" > "+possibleErr+"\n"+
" (use unquoted or double quoted strings)";
} else {
return "found '"+ch+"' in a string value, your mistake could be with:\n"+
" > "+possibleErr+"\n"+
" (unquoted strings contain everything up to the next line!)";
}
} else return "";
}
return report('}') || report(']');
return report("'") || report('}') || report(']');
}

@@ -279,0 +286,0 @@

/* Hjson http://hjson.org */
/* jslint node: true */
"use strict";

@@ -4,0 +3,0 @@

@@ -1,1 +0,1 @@

module.exports="2.4.1";
module.exports="2.4.2";

@@ -1,6 +0,6 @@

/*! @preserve
* Hjson v2.4.1
/*!
* Hjson v2.4.2
* http://hjson.org
*
* Copyright 2014-2016 Christian Zangl, MIT license
* Copyright 2014-2017 Christian Zangl, MIT license
* Details and documentation:

@@ -136,3 +136,2 @@ * https://github.com/hjson/hjson-js

/*jslint node: true */
"use strict";

@@ -139,0 +138,0 @@

@@ -6,3 +6,3 @@ {

"author": "Christian Zangl",
"version": "2.4.1",
"version": "2.4.2",
"keywords": [

@@ -25,4 +25,4 @@ "json",

"build_v2": "node -e 'var v=\" * Hjson v\"+eval(\"(\"+process.argv[1]+\")\").version; if (v!==process.argv[2]) throw new Error(\"ver\");' -- \"`cat package.json`\" \"`grep -E '\\* Hjson v.*$' lib/hjson.js`\"",
"build_bundle": "node_modules/browserify/bin/cmd.js lib/hjson.js --ignore os -s Hjson -o bundle/hjson.js",
"build_min": "node node_modules/uglify-js/bin/uglifyjs bundle/hjson.js --comments -c -m -o bundle/hjson.min.js",
"build_bundle": "node_modules/browserify/bin/cmd.js -p browserify-header --ignore os -s Hjson -o bundle/hjson.js lib/hjson.js",
"build_min": "node node_modules/uglify-js/bin/uglifyjs bundle/hjson.js --comments=/^!/ -c -m -o bundle/hjson.min.js",
"build": "npm run build_v1 && npm run build_v2 && npm run test && npm run lint && npm run build_bundle && npm run build_min"

@@ -40,6 +40,7 @@ },

"devDependencies": {
"browserify": "^13.1.1",
"eslint": "^3.12.2",
"uglify-js": "^2.4.24"
"browserify": "^13.3.0",
"browserify-header": "0.9.2",
"eslint": "^3.13.1",
"uglify-js": "^2.7.5"
}
}

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