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

Function P

pages/viewScriptSource/libs/highlight.min.js:93–99  ·  view source on GitHub ↗
(e,t)

Source from the content-addressed store, hash-verified

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

Callers

nothing calls this directly

Calls 2

pFunction · 0.70
dFunction · 0.70

Tested by

no test coverage detected