MCPcopy Create free account
hub / github.com/aboutcode-org/vulnerablecode / B

Function B

vulnerablecode/static/js/highlight-10.6.0.min.js:78–82  ·  view source on GitHub ↗
(e,t,n="keyword")

Source from the content-addressed store, hash-verified

76void 0===e.relevance&&(e.relevance=1)}
77const L=["of","and","for","in","not","or","if","then","parent","list","value"]
78;function B(e,t,n="keyword"){const s={}
79;return"string"==typeof e?r(n,e.split(" ")):Array.isArray(e)?r(n,e):Object.keys(e).forEach((n=>{
80Object.assign(s,B(e[n],t,n))})),s;function r(e,n){
81t&&(n=n.map((e=>e.toLowerCase()))),n.forEach((t=>{const n=t.split("|")
82;s[n[0]]=[e,I(n[0],n[1])]}))}}function I(e,t){
83return t?Number(t):(e=>L.includes(e.toLowerCase()))(e)?0:1}
84function T(e,{plugins:t}){function n(t,n){
85return RegExp(u(t),"m"+(e.case_insensitive?"i":"")+(n?"g":""))}class s{

Callers 1

TFunction · 0.85

Calls 1

rFunction · 0.70

Tested by

no test coverage detected