(code)
| 614 | } |
| 615 | |
| 616 | var stripIndentation = function (code) { |
| 617 | let line |
| 618 | const codeLines = code.split('\n') |
| 619 | const indentation = _.min(_.filter(codeLines.map(line => __guard__(__guard__(line.match(/^\s*/), x2 => x2[0]), x1 => x1.length)))) |
| 620 | const strippedCode = ((() => { |
| 621 | const result = [] |
| 622 | for (line of Array.from(codeLines)) { |
| 623 | result.push(line.substr(indentation)) |
| 624 | } |
| 625 | return result |
| 626 | })()).join('\n') |
| 627 | return strippedCode |
| 628 | } |
| 629 | |
| 630 | const removeAI = function (str) { |
| 631 | // we have some objects as return value. |
no test coverage detected