0.3.29 • Published 9 months ago

newline-iterator v0.3.29

Weekly downloads
-
License
MIT
Repository
github
Last release
9 months ago

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

API Docs

0.3.17

10 months ago

0.3.16

10 months ago

0.3.15

10 months ago

0.3.14

10 months ago

0.3.13

10 months ago

0.3.11

10 months ago

0.3.10

10 months ago

0.3.29

9 months ago

0.3.20

9 months ago

0.3.28

9 months ago

0.3.27

9 months ago

0.3.26

9 months ago

0.3.25

9 months ago

0.3.24

9 months ago

0.3.23

9 months ago

0.3.22

9 months ago

0.3.21

9 months ago

0.3.19

9 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