0.3.29 • Published 5 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
6 months ago
0.3.16
6 months ago
0.3.15
6 months ago
0.3.14
6 months ago
0.3.13
6 months ago
0.3.11
6 months ago
0.3.10
6 months ago
0.3.29
5 months ago
0.3.20
5 months ago
0.3.28
5 months ago
0.3.27
5 months ago
0.3.26
5 months ago
0.3.25
5 months ago
0.3.24
5 months ago
0.3.23
5 months ago
0.3.22
5 months ago
0.3.21
5 months ago
0.3.19
6 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