MCPcopy Create free account
hub / github.com/FSoft-AI4Code/HyperAgent / U

Function U

hyperagent-ext/media/scripts/highlight.min.js:100–104  ·  view source on GitHub ↗
(e,n,t="keyword")

Source from the content-addressed store, hash-verified

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

Callers 1

QFunction · 0.85

Calls 4

keysMethod · 0.80
assignMethod · 0.80
iFunction · 0.70
createMethod · 0.45

Tested by

no test coverage detected