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

Function z

hyperagent-ext/media/scripts/highlight.min.js:93–99  ·  view source on GitHub ↗
(e,n)

Source from the content-addressed store, hash-verified

91 if(e.begin||e.end)throw Error("begin & end are not supported with match")
92 ;e.begin=e.match,delete e.match}}function $(e,n){
93 void 0===e.relevance&&(e.relevance=1)}const z=(e,n)=>{if(!e.beforeMatch)return
94 ;if(e.starts)throw Error("beforeMatch cannot be used with starts")
95 ;const t=Object.assign({},e);Object.keys(e).forEach((n=>{delete e[n]
96 })),e.keywords=t.keywords,e.begin=m(t.beforeMatch,g(t.begin)),e.starts={
97 relevance:0,contains:[Object.assign(t,{endsParent:!0})]
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){

Callers

nothing calls this directly

Calls 5

ErrorClass · 0.85
assignMethod · 0.80
keysMethod · 0.80
mFunction · 0.70
gFunction · 0.70

Tested by

no test coverage detected