* Returns array of strings split by newline * @param {*} str - The value to split by newline. * @returns {string|string[]} value if newline present - Returned from String split() method * @function
(str)
| 147 | * @function |
| 148 | */ |
| 149 | function splitNewlines(str) { |
| 150 | if ((typeof str === 'string' || str instanceof String) && str.indexOf('\n') > -1) { |
| 151 | return str.split('\n'); |
| 152 | } |
| 153 | return str; |
| 154 | } |
| 155 | |
| 156 | |
| 157 | /** |
no outgoing calls
no test coverage detected