/** * Created by Erxin, Shang(Edwin) on 6/21/2016. * JavaScript Configuration file(.ini) content parser, similar to python ConfigParser without I/O operations * The license is under GPL-3.0 * Git repo:https://github.com/shangerxin/config-ini * Author homepage: http://www.shangerxin.com * Version, 1.6.1 */ !function(t){var n=Object.assign(new Error,{name:"ConfigIniParser Error",message:"Parse config ini file error"}),r=Object.assign(new Error,{name:"ConfigIniParser Error",message:"The specify section not found"}),e=Object.assign(new Error,{name:"ConfigIniParser Error",message:"The specify option not found"}),i=Object.assign(new Error,{name:"ConfigIniParser Error",message:"Found duplicated section in the given ini file"}),o=Object.assign(new Error,{name:"ConfigIniParser Error",message:"Multiple call parse on the same parser instance"}),s=Object.assign(new TypeError,{name:"ConfigIniParser Error",message:"The argument type is not correct"}),a="__DEFAULT_SECTION__",u=/^\s*\[\s*([^\]]+?)\s*\]\s*$/,p=/\s*([^=:\s]+)\s*[=:]\s*(.*)\s*/,f=/^\s*[#;].*/,c=/^\s*$/,h=-1;function l(t,n){for(var r=t.sections,e=0;e0&&i.push("")}return i.join(t||this.delimiter)},y.prototype.parse=function(t){if(this._calledParse)throw o;this._calledParse=!0;for(var r=t.split(this.delimiter),e=l(this._ini,a),s=0;s