npm / fstream

Advanced FS Streaming for Node
ISC License
208 stars 43 forks source link

Writer examples in readme are wrong #47

Open jasonkarns opened 8 years ago

jasonkarns commented 8 years ago

All three Writer examples on the readme invoke end on the return of `write(). But .write() returns booleans, not objects with .end methods.

fstream
  .Writer({ path: "path/to/file"
          , mode: 0755
          , size: 6
          })
  .write("hello\n")
  .end() //=> TypeError: fstream.Writer(...).write(...).end is not a function
jasonkarns commented 8 years ago

Apparently the Writer functions need invoked as constructors, too, which is not how they are shown in the readme