(str)
| 1 | var makeString = require('./helper/makeString'); |
| 2 | |
| 3 | function getIndent(str) { |
| 4 | var matches = str.match(/^[\s\\t]*/gm); |
| 5 | var indent = matches[0].length; |
| 6 | |
| 7 | for (var i = 1; i < matches.length; i++) { |
| 8 | indent = Math.min(matches[i].length, indent); |
| 9 | } |
| 10 | |
| 11 | return indent; |
| 12 | } |
| 13 | |
| 14 | module.exports = function dedent(str, pattern) { |
| 15 | str = makeString(str); |
no outgoing calls
no test coverage detected
searching dependent graphs…