(from, to)
| 170 | return new Array(min + 1).join(' '); |
| 171 | } |
| 172 | function getRelativePath(from, to) { |
| 173 | const fromParts = from.split(/[/\\]/); |
| 174 | const toParts = to.split(/[/\\]/); |
| 175 | fromParts.pop(); |
| 176 | while (fromParts[0] === toParts[0]) { |
| 177 | fromParts.shift(); |
| 178 | toParts.shift(); |
| 179 | } |
| 180 | if (fromParts.length) { |
| 181 | let i = fromParts.length; |
| 182 | while (i--) fromParts[i] = '..'; |
| 183 | } |
| 184 | return fromParts.concat(toParts).join('/'); |
| 185 | } |
| 186 | const toString = Object.prototype.toString; |
| 187 | function isObject(thing) { |
| 188 | return toString.call(thing) === '[object Object]'; |
no test coverage detected