writer.js
Just a dumb little JS library providing an abstraction around the concept of writing text to
something. Could be stdout, could be a file (not implemented yet), could be a string.
Loosely based off similar concepts in the worlds of Java, .NET (e.g.
TextWriter) and
probably elsewhere.
Example
var writer = require('writer');
var stringWriter = new writer.StringWriter();
stringWriter.write('foo');
stringWriter.write('bar');
stringWriter.write('baz');
stringWriter.toString();
var consoleWriter = new writer.ConsoleWriter();
consoleWriter.write('hey!');
consoleWriter.write('look!');
Make sense? Makes sense to me, anyway.