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

Function getHn

Rewrite-Parser.beta.js:2528–2538  ·  view source on GitHub ↗
(x, arr, addMethod, toggleKey = '')

Source from the content-addressed store, hash-verified

2526}
2527
2528function getHn(x, arr, addMethod, toggleKey = '') {
2529 let hnBox2 = x
2530 .replace(/\s|%.+%/g, '')
2531 .split('=')[1]
2532 .split(/,/)
2533 for (let i = 0; i < hnBox2.length; i++) {
2534 hnBox2[i].length > 0 && arr.push(toggleKey ? { value: hnBox2[i], toggleKey } : hnBox2[i])
2535 } //for
2536 if (/%INSERT%/i.test(x)) return '%INSERT%'
2537 else return addMethod
2538}
2539
2540function pieceHn(arr) {
2541 arr = arr.map(item => getHnValue(item))

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected