MCPcopy Create free account
hub / github.com/Useful-Scripts-Extension/useful-script / $

Function $

pages/viewScriptSource/libs/highlight.min.js:100–104  ·  view source on GitHub ↗
(e,t,n="keyword")

Source from the content-addressed store, hash-verified

98},e.relevance=0,delete n.beforeMatch
99},C=["of","and","for","in","not","or","if","then","parent","list","value"]
100;function $(e,t,n="keyword"){const i=Object.create(null)
101;return"string"==typeof e?r(n,e.split(" ")):Array.isArray(e)?r(n,e):Object.keys(e).forEach((n=>{
102Object.assign(i,$(e[n],t,n))})),i;function r(e,n){
103t&&(n=n.map((e=>e.toLowerCase()))),n.forEach((t=>{const n=t.split("|")
104;i[n[0]]=[e,U(n[0],n[1])]}))}}function U(e,t){
105return t?Number(t):(e=>C.includes(e.toLowerCase()))(e)?0:1}const z={},K=e=>{
106console.error(e)},W=(e,...t)=>{console.log("WARN: "+e,...t)},X=(e,t)=>{
107z[`${e}/${t}`]||(console.log(`Deprecated as of ${e}. ${t}`),z[`${e}/${t}`]=!0)

Callers 1

VFunction · 0.70

Calls 1

rFunction · 0.70

Tested by

no test coverage detected