0.3.29 • Published 10 months ago
newline-iterator v0.3.29
newline-iterator
Line-by-line string iterator
Example 1
import newlineIterator from "newline-iterator";
const iterator = newlineIterator("some\r\nstring\ncombination\r");
const results = [];
for (const line of iterator) results.push(line);
console.log(results); // ["some", "string", "combination"];Example 2
import newlineIterator from "newline-iterator";
const iterator = newlineIterator("some\r\nstring\ncombination\r");
console.log(iterator.next()); // { value: "some", done: false }
console.log(iterator.next()); // { value: "string", done: false }
console.log(iterator.next()); // { value: "combination", done: false }
console.log(iterator.next()); // { value: undefined, done: true }Documentation
0.3.17
11 months ago
0.3.16
11 months ago
0.3.15
11 months ago
0.3.14
11 months ago
0.3.13
11 months ago
0.3.11
11 months ago
0.3.10
11 months ago
0.3.29
10 months ago
0.3.20
10 months ago
0.3.28
10 months ago
0.3.27
10 months ago
0.3.26
10 months ago
0.3.25
10 months ago
0.3.24
10 months ago
0.3.23
10 months ago
0.3.22
10 months ago
0.3.21
10 months ago
0.3.19
10 months ago
0.3.9
3 years ago
0.3.6
3 years ago
0.3.5
3 years ago
0.3.8
3 years ago
0.3.7
3 years ago
0.3.0
4 years ago
0.3.2
4 years ago
0.3.1
4 years ago
0.3.4
4 years ago
0.3.3
4 years ago
0.2.0
4 years ago
0.1.0
4 years ago