(replacement)
| 10 | var parents = (options.parents = options.parents || []); |
| 11 | |
| 12 | var replace = function replace(replacement) { |
| 13 | if (Array.isArray(replacement) && !replace.arrayAllowed) { |
| 14 | throw new Error( |
| 15 | 'replace() can only be called with an array if the last parent is a Block or NamedBlock' |
| 16 | ); |
| 17 | } |
| 18 | ast = replacement; |
| 19 | }; |
| 20 | replace.arrayAllowed = |
| 21 | parents[0] && |
| 22 | (/^(Named)?Block$/.test(parents[0].type) || |
no outgoing calls
no test coverage detected
searching dependent graphs…