-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathjsion.min.js
1 lines (1 loc) · 1.42 KB
/
jsion.min.js
1
var JSION;!function(e){function r(e,r){return[new RegExp(Object.keys(e).map(((e,r)=>`(?<_${r}>${e})`)).join("|"),r),function(...r){const[n,s]=Object.entries(r.at(-1)).find((([,e])=>null!=e));return Object.values(e)[+n.slice(1)](s)}]}e.VERSION=Object.freeze({toString:()=>`${e.VERSION.major}.${e.VERSION.minor}.${e.VERSION.patch}${void 0!==e.VERSION.prerelease?`-${e.VERSION.prerelease}`:""}${void 0!==e.VERSION.metadata?`+${e.VERSION.metadata}`:""}`,major:1,minor:0,patch:3}),e.transpile=function(e){return e.replace(...r({[/(?<!\\)(?:\\{2})*"(?:(?<!\\)(?:\\{2})*\\"|[^"])*(?<!\\)(?:\\{2})*"/.source]:e=>e,[/(?<!\\)(?:\\{2})*'(?:(?<!\\)(?:\\{2})*\\'|[^'])*(?<!\\)(?:\\{2})*'/.source]:e=>`"${e.slice(1,-1).replace(/"/g,'\\"').replace(/\\'/g,"'")}"`,[/\(\*[\s\S]*?(?<!\\)(?:\\\\)*\*\)/.source]:()=>""},"g")).replace(...r({[/(?<!\\)(?:\\{2})*"(?:(?<!\\)(?:\\{2})*\\"|[^"])*(?<!\\)(?:\\{2})*"/.source]:e=>e,[/[a-zA-Z_$][0-9a-zA-Z_$]*(?=\s*?:)/.source]:e=>`"${e}"`,[/(?<=[\[,])\s*?,(?=\s*?])|(?<=[\[,])\s*?(?=,)/.source]:e=>"null",[/,(?=\s*?[}\]])/.source]:()=>"",[/(?<=:)(\s*?)(?=[,}])/.source]:e=>e+"null",[/\?+/.source]:()=>"null",[/\b(?:0b(?:[0-1](?:_[0-1])*?)+|0o(?:[0-7](?:_[0-7])*?)+|0x(?:[0-9a-fA-F](?:_[0-9a-fA-F])*?)+)\b/.source]:e=>+e.replace(/_/g,"")+"",[/(?<=\d)_(?=\d)/.source]:()=>""},"g")).replace(/\n([^\S\n]*\n)+/g,"\n").trim()},e.parse=function(r,...n){return JSON.parse(e.transpile(r),...n)},e.stringify=JSON.stringify}(JSION||(JSION={}));