vendor: 6,402 bytes, lines 1-16
1// highlight.js/lib/languages/[email protected] downloaded from https://ga.jspm.io/npm:[email protected]/es/languages/javascript.js 2 3const e="[A-Za-z$_][0-9A-Za-z$_]*";const n=["as","in","of","if","for","while","finally","var","new","function","do","return","void","else","break","catch","instanceof","with","throw","case","default","try","switch","continue","typeof","delete","let","yield","const","class","debugger","async","await","static","import","from","export","extends","using"];const a=["true","false","null","undefined","NaN","Infinity"];const t=["Object","Function","Boolean","Symbol","Math","Date","Number","BigInt","String","RegExp","Array","Float32Array","Float64Array","Int8Array","Uint8Array","Uint8ClampedArray","Int16Array","Int32Array","Uint16Array","Uint32Array","BigInt64Array","BigUint64Array","Set","Map","WeakSet","WeakMap","ArrayBuffer","SharedArrayBuffer","Atomics","DataView","JSON","Promise","Generator","GeneratorFunction","AsyncFunction","Reflect","Proxy","Intl","WebAssembly"];const s=["Error","EvalError","InternalError","RangeError","ReferenceError","SyntaxError","TypeError","URIError"];const c=["setInterval","setTimeout","clearInterval","clearTimeout","require","exports","eval","isFinite","isNaN","parseFloat","parseInt","decodeURI","decodeURIComponent","encodeURI","encodeURIComponent","escape","unescape"];const r=["arguments","this","super","console","window","document","localStorage","sessionStorage","module","global"];const o=[].concat(c,t,s); 4/** @type LanguageFn */function javascript(i){const l=i.regex; 5/** 6 * Takes a string like "<Booger" and checks to see 7 * if we can find a matching "</Booger" later in the 8 * content. 9 * @param {RegExpMatchArray} match 10 * @param {{after:number}} param1 11 */const hasClosingTag=(e,{after:n})=>{const a="</"+e[0].slice(1);const t=e.input.indexOf(a,n);return t!==-1};const d=e;const b={begin:"<>",end:"</>"};const u=/<[A-Za-z0-9\\._:-]+\s*\/>/;const g={begin:/<[A-Za-z0-9\\._:-]+/,end:/\/[A-Za-z0-9\\._:-]+>|\/>/, 12/** 13 * @param {RegExpMatchArray} match 14 * @param {CallbackResponse} response 15 */ 16isTrulyOpeningTag:(e,n)=>{const a=e[0].length+e.index;const t=e.input[a];if(t==="<"||t===","){n.ignoreMatch();return}t===">"&&(hasClosingTag(e,{after:a})||n.ignoreMatch());let s;const c=e.input.substring(a);((s=c.match(/^\s*=/))||(s=c.match(/^\s+extends\s+/))&&s.index===0)&&n.ignoreMatch()}};const m={$pattern:e,keyword:n,literal:a,built_in:o,"variable.language":r};const E="[0-9](_?[0-9])*";const A=`\\.(${E})`;const y="0|[1-9](_?[0-9])*|0[0-7]*[89][0-9]*";const f={className:"number",variants:[{begin:`(\\b(${y})((${A})|\\.)?|(${A}))[eE][+-]?(${E})\\b`},{begin:`\\b(${y})\\b((${A})\\b|\\.)?|(${A})\\b`},{begin:"\\b(0|[1-9](_?[0-9])*)n\\b"},{begin:"\\b0[xX][0-9a-fA-F](_?[0-9a-fA-F])*n?\\b"},{begin:"\\b0[bB][0-1](_?[0-1])*n?\\b"},{begin:"\\b0[oO][0-7](_?[0-7])*n?\\b"},{begin:"\\b0[0-7]+n?\\b"}],relevance:0};const h={className:"subst",begin:"\\$\\{",end:"\\}",keywords:m,contains:[]};const _={begin:".?html`",end:"",starts:{end:"`",returnEnd:false,contains:[i.BACKSLASH_ESCAPE,h],subLanguage:"xml"}};const N={begin:".?css`",end:"",starts:{end:"`",returnEnd:false,contains:[i.BACKSLASH_ESCAPE,h],subLanguage:"css"}};const p={begin:".?gql`",end:"",starts:{end:"`",returnEnd:false,contains:[i.BACKSLASH_ESCAPE,h],subLanguage:"graphql"}};const S={className:"string",begin:"`",end:"`",contains:[i.BACKSLASH_ESCAPE,h]};const v=i.COMMENT(/\/\*\*(?!\/)/,"\\*/",{relevance:0,contains:[{begin:"(?=@[A-Za-z]+)",relevance:0,contains:[{className:"doctag",begin:"@[A-Za-z]+"},{className:"type",begin:"\\{",end:"\\}",excludeEnd:true,excludeBegin:true,relevance:0},{className:"variable",begin:d+"(?=\\s*(-)|$)",endsParent:true,relevance:0},{begin:/(?=[^\n])\s/,relevance:0}]}]});const w={className:"comment",variants:[v,i.C_BLOCK_COMMENT_MODE,i.C_LINE_COMMENT_MODE]};const R=[i.APOS_STRING_MODE,i.QUOTE_STRING_MODE,_,N,p,S,{match:/\$\d+/},f];h.contains=R.concat({begin:/\{/,end:/\}/,keywords:m,contains:["self"].concat(R)});const O=[].concat(w,h.contains);const k=O.concat([{begin:/(\s*)\(/,end:/\)/,keywords:m,contains:["self"].concat(O)}]);const I={className:"params",begin:/(\s*)\(/,end:/\)/,excludeBegin:true,excludeEnd:true,keywords:m,contains:k};const x={variants:[{match:[/class/,/\s+/,d,/\s+/,/extends/,/\s+/,l.concat(d,"(",l.concat(/\./,d),")*")],scope:{1:"keyword",3:"title.class",5:"keyword",7:"title.class.inherited"}},{match:[/class/,/\s+/,d],scope:{1:"keyword",3:"title.class"}}]};const T={relevance:0,match:l.either(/\bJSON/,/\b[A-Z][a-z]+([A-Z][a-z]*|\d)*/,/\b[A-Z]{2,}([A-Z][a-z]+|\d)+([A-Z][a-z]*)*/,/\b[A-Z]{2,}[a-z]+([A-Z][a-z]+|\d)*([A-Z][a-z]*)*/),className:"title.class",keywords:{_:[...t,...s]}};const C={label:"use_strict",className:"meta",relevance:10,begin:/^\s*['"]use (strict|asm)['"]/};const M={variants:[{match:[/function/,/\s+/,d,/(?=\s*\()/]},{match:[/function/,/\s*(?=\()/]}],className:{1:"keyword",3:"title.function"},label:"func.def",contains:[I],illegal:/%/};const $={relevance:0,match:/\b[A-Z][A-Z_0-9]+\b/,className:"variable.constant"};function noneOf(e){return l.concat("(?!",e.join("|"),")")}const B={match:l.concat(/\b/,noneOf([...c,"super","import"].map((e=>`${e}\\s*\\(`))),d,l.lookahead(/\s*\(/)),className:"title.function",relevance:0};const Z={begin:l.concat(/\./,l.lookahead(l.concat(d,/(?![0-9A-Za-z$_(])/))),end:d,excludeBegin:true,keywords:"prototype",className:"property",relevance:0};const z={match:[/get|set/,/\s+/,d,/(?=\()/],className:{1:"keyword",3:"title.function"},contains:[{begin:/\(\)/},I]};const D="(\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)|"+i.UNDERSCORE_IDENT_RE+")\\s*=>";const U={match:[/const|var|let/,/\s+/,d,/\s*/,/=\s*/,/(async\s*)?/,l.lookahead(D)],keywords:"async",className:{1:"keyword",3:"title.function"},contains:[I]};return{name:"JavaScript",aliases:["js","jsx","mjs","cjs"],keywords:m,exports:{PARAMS_CONTAINS:k,CLASS_REFERENCE:T},illegal:/#(?![$_A-z])/,contains:[i.SHEBANG({label:"shebang",binary:"node",relevance:5}),C,i.APOS_STRING_MODE,i.QUOTE_STRING_MODE,_,N,p,S,w,{match:/\$\d+/},f,T,{scope:"attr",match:d+l.lookahead(":"),relevance:0},U,{begin:"("+i.RE_STARTERS_RE+"|\\b(case|return|throw)\\b)\\s*",keywords:"return throw case",relevance:0,contains:[w,i.REGEXP_MODE,{className:"function",begin:D,returnBegin:true,end:"\\s*=>",contains:[{className:"params",variants:[{begin:i.UNDERSCORE_IDENT_RE,relevance:0}
vendor: 835 bytes, lines 16-17
16,{className:null,begin:/\(\s*\)/,skip:true},{begin:/(\s*)\(/,end:/\)/,excludeBegin:true,excludeEnd:true,keywords:m,contains:k}]}]},{begin:/,/,relevance:0},{match:/\s+/,relevance:0},{variants:[{begin:b.begin,end:b.end},{match:u},{begin:g.begin,"on:begin":g.isTrulyOpeningTag,end:g.end}],subLanguage:"xml",contains:[{begin:g.begin,end:g.end,skip:true,contains:["self"]}]}]},M,{beginKeywords:"while if switch catch for"},{begin:"\\b(?!function)"+i.UNDERSCORE_IDENT_RE+"\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)\\s*\\{",returnBegin:true,label:"func.def",contains:[I,i.inherit(i.TITLE_MODE,{begin:d,className:"title.function"})]},{match:/\.\.\./,relevance:0},Z,{match:"\\$"+d,relevance:0},{match:[/\bconstructor(?=\s*\()/],className:{1:"title.function"},contains:[I]},B,$,x,z,{match:/\$[(.]/}]}}export{javascript as default}; 17
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.