0.0.2 • Published 10 years ago

unescape-stream v0.0.2

Weekly downloads
10
License
-
Repository
github
Last release
10 years ago

Unescape Stream

Remove instances of repeated escapes '\' in an arbituarily large file

Installation

npm install unescape-stream

Usage

UnescapeStream = require "unescape-stream"
ues = new UnescapeStream()

data = ""
fs.createReadStream(__dirname + "/fixtures/escaped_string_long")
  .pipe @ues

@ues.on "data", (chunk)->
  data += chunk

@ues.on "end", ()->
  console.log data
  

Sample File

This is the first line\\\\\nThis is the second line

Sample output

output = "This is the first line\nThis is the second line"
0.0.2

10 years ago

0.0.1

10 years ago