MCPcopy Create free account
hub / github.com/Script-Hub-Org/Script-Hub / getJsInfo

Function getJsInfo

Rewrite-Parser.beta.js:2477–2493  ·  view source on GitHub ↗
(x, regex, parserRegex)

Source from the content-addressed store, hash-verified

2475
2476//script
2477function getJsInfo(x, regex, parserRegex) {
2478 parserRegex =
2479 typeof parserRegex != 'undefined'
2480 ? parserRegex
2481 : /script-name\s*=/.test(x)
2482 ? panelRegex
2483 : /script-path\s*=/.test(x)
2484 ? jsRegex
2485 : /\s(data-type|data|data-path)\s*=/.test(x)
2486 ? mockRegex
2487 : ''
2488 if (regex.test(x)) {
2489 return x.split(regex)[1].split(parserRegex)[0]
2490 } else {
2491 return ''
2492 }
2493}
2494
2495function reJsValue(target, nvalue, jsname, ori, orivalue) {
2496 let q = orivalue

Callers 2

getMockInfoFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected