From 947cd61b13de66f74f4f79b76acfd80d5d110c9c Mon Sep 17 00:00:00 2001 From: Dimitri Benin Date: Wed, 16 Aug 2017 11:15:22 +0200 Subject: [PATCH] Rename this.seperator to this.separator --- README.md | 2 +- index.js | 6 +++--- test/test.js | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index 3fdfc9c..d08595d 100644 --- a/README.md +++ b/README.md @@ -64,7 +64,7 @@ var stringify = Stringify() stringify.replacer = function () {} stringify.space = 2 stringify.opener = '[' -stringify.seperator = ',' +stringify.separator = ',' stringify.closer = ']' stringify.stringifier = JSON.stringify ``` diff --git a/index.js b/index.js index ccc4288..433175b 100644 --- a/index.js +++ b/index.js @@ -27,13 +27,13 @@ function Stringify(options) { // Array Deliminator and Stringifier defaults var opener = options && options.opener ? options.opener : '[\n' - var seperator = options && options.seperator ? options.seperator : '\n,\n' + var separator = options && options.separator ? options.separator : '\n,\n' var closer = options && options.closer ? options.closer : '\n]\n' var stringifier = options && options.stringifier ? options.stringifier : stringify // Array Deliminators and Stringifier this.opener = new Buffer(opener, 'utf8') - this.seperator = new Buffer(seperator, 'utf8') + this.separator = new Buffer(separator, 'utf8') this.closer = new Buffer(closer, 'utf8') this.stringifier = stringifier } @@ -47,7 +47,7 @@ Stringify.prototype.space = 0 Stringify.prototype._transform = function (doc, enc, cb) { if (this.started) { - this.push(this.seperator) + this.push(this.separator) } else { this.push(this.opener) this.started = true diff --git a/test/test.js b/test/test.js index bcf6080..e6cf9ad 100644 --- a/test/test.js +++ b/test/test.js @@ -178,12 +178,12 @@ describe('Streamify()', function () { stream.end(obj) }) - it('should allow custom seperators', function (done) { + it('should allow custom separators', function (done) { var stream = new PassThrough({ objectMode: true }) - var stringify = Stringify({seperator: ' , '}) + var stringify = Stringify({separator: ' , '}) stream .pipe(stringify)