Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

allow for append flag via options.flags

  • Loading branch information...
commit 077758c5e820521eb79a259ab6190860de7c3102 1 parent dc81f24
@davidmarkclements davidmarkclements authored
Showing with 2 additions and 2 deletions.
  1. +2 −2 lib/ya-csv.js
View
4 lib/ya-csv.js
@@ -159,7 +159,7 @@ CsvReader.prototype._addRecord = function() {
csv.createCsvFileReader = function(path, options) {
options = options || {};
var readStream = fs.createReadStream(path, {
- 'flags': 'r'
+ 'flags': options.flags || 'r'
});
readStream.setEncoding(options.encoding || 'utf8');
return new CsvReader(readStream, options);
@@ -234,7 +234,7 @@ function _appendField(outArr, writer, field) {
csv.createCsvFileWriter = function(path, options) {
var writeStream = fs.createWriteStream(path, {
- 'flags': 'w'
+ 'flags': options.flags || 'w'
});
return new CsvWriter(writeStream, options);
};
Please sign in to comment.
Something went wrong with that request. Please try again.