0.1.0 • Published 8 years ago

text-reader v0.1.0

Weekly downloads
3
License
MIT
Repository
github
Last release
8 years ago

text-reader

ES6 text reader.

Example

let content = 'BEGIN\r\nFoo\r\nBar\r\nHello World\r\n\r\nEND';

let reader = TextReader.create(content);

let lines = [];

while (reader.available) {
  let line = reader.readLine();
  lines.push(line);
}

console.log(lines); // ['BEGIN', 'Foo', 'Bar', 'Hello World', '', 'END']

Install

npm install text-reader --save

License

MIT