(str)
| 2379 | } |
| 2380 | |
| 2381 | function getPolicy(str) { |
| 2382 | let commaNum = str.lastIndexOf(',') |
| 2383 | let bracesNum = str.lastIndexOf('}') |
| 2384 | let roundNum = str.lastIndexOf(')') |
| 2385 | if (/,\s*\{\{\{[^,]+\}\}\}$/.test(str)) { |
| 2386 | return str.match(/\{\{\{[^,]+\}\}\}$/)[0] |
| 2387 | } else if (commaNum > bracesNum && commaNum > roundNum) { |
| 2388 | return str.substring(str.lastIndexOf(',') + 1).trim() |
| 2389 | } else { |
| 2390 | return '' |
| 2391 | } |
| 2392 | } |
| 2393 | |
| 2394 | function parseArguments(str) { |
| 2395 | if (/#!arguments/.test(str)) { |