(exs)
| 122 | // and parsing it with Recast and extracting the ObjectPatter node. |
| 123 | // Feeding this back to Recast will preserve the formatting. |
| 124 | function createDestructPattern(exs) { |
| 125 | const props = uniqPropNames(exs).join(', '); |
| 126 | const js = `function foo({${props}}) {};`; |
| 127 | const ast = parse(js, {parser}); |
| 128 | return ast.program.body[0].params[0]; |
| 129 | } |
no test coverage detected
searching dependent graphs…