(array, predicate)
| 2570 | } |
| 2571 | ts.padRight = padRight; |
| 2572 | function takeWhile(array, predicate) { |
| 2573 | var len = array.length; |
| 2574 | var index = 0; |
| 2575 | while (index < len && predicate(array[index])) { |
| 2576 | index++; |
| 2577 | } |
| 2578 | return array.slice(0, index); |
| 2579 | } |
| 2580 | ts.takeWhile = takeWhile; |
| 2581 | /** |
| 2582 | * Removes the leading and trailing white space and line terminator characters from a string. |