(strFn, token)
| 69 | * @returns {ReturnStringCallback} a function that returns the part of the string before the token |
| 70 | */ |
| 71 | const getBefore = (strFn, token) => () => { |
| 72 | const str = strFn(); |
| 73 | const idx = str.lastIndexOf(token); |
| 74 | return idx < 0 ? "" : str.slice(0, idx); |
| 75 | }; |
| 76 | |
| 77 | /** |
| 78 | * Returns a function that returns a hash of the string |
no test coverage detected