(arrayStr: string)
| 218 | } |
| 219 | |
| 220 | export function splitArrayString(arrayStr: string): string[] { |
| 221 | // Remove the starting and ending square brackets |
| 222 | const content = arrayStr.trim().slice(1, -1).trim(); |
| 223 | const pairs: [number, number][] = []; |
| 224 | let lastEndIndex = 0; |
| 225 | |
| 226 | while (lastEndIndex < content.length) { |
| 227 | const newPairs = findMatchingIndices(content, '{', '}', lastEndIndex); |
| 228 | if (newPairs.length === 0) break; |
| 229 | pairs.push(newPairs[0]); |
| 230 | lastEndIndex = newPairs[0][1] + 1; |
| 231 | } |
| 232 | |
| 233 | return pairs.map(([start, end]) => { |
| 234 | // Extract the string and further process to remove excess whitespace |
| 235 | const extracted = content.slice(start, end + 1).trim(); |
| 236 | return extracted.replace(/\s+/g, ' '); |
| 237 | }); |
| 238 | } |
| 239 | |
| 240 | // Cold validate on ts manifest, for generate scaffold command |
| 241 | export function validateEthereumTsManifest(manifest: string): boolean { |
no test coverage detected