(argString)
| 12948 | } |
| 12949 | } |
| 12950 | function splitBySlash(argString) { |
| 12951 | var slashes = findUnescapedSlashes(argString) || []; |
| 12952 | if (!slashes.length) return []; |
| 12953 | var tokens = []; |
| 12954 | // in case of strings like foo/bar |
| 12955 | if (slashes[0] !== 0) return; |
| 12956 | for (var i = 0; i < slashes.length; i++) { |
| 12957 | if (typeof slashes[i] == 'number') |
| 12958 | tokens.push(argString.substring(slashes[i] + 1, slashes[i+1])); |
| 12959 | } |
| 12960 | return tokens; |
| 12961 | } |
| 12962 | |
| 12963 | function findUnescapedSlashes(str) { |
| 12964 | var escapeNextChar = false; |
no test coverage detected