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

Function getJsInfo

Rewrite-Parser.js:2074–2090  ·  view source on GitHub ↗
(x, regex, parserRegex)

Source from the content-addressed store, hash-verified

2072
2073//script
2074function getJsInfo(x, regex, parserRegex) {
2075 parserRegex =
2076 typeof parserRegex != 'undefined'
2077 ? parserRegex
2078 : /script-name\s*=/.test(x)
2079 ? panelRegex
2080 : /script-path\s*=/.test(x)
2081 ? jsRegex
2082 : /\s(data-type|data|data-path)\s*=/.test(x)
2083 ? mockRegex
2084 : ''
2085 if (regex.test(x)) {
2086 return x.split(regex)[1].split(parserRegex)[0]
2087 } else {
2088 return ''
2089 }
2090}
2091
2092function reJsValue(target, nvalue, jsname, ori, orivalue) {
2093 let q = orivalue

Callers 2

Rewrite-Parser.jsFile · 0.70
getMockInfoFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected