Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
46 changes: 0 additions & 46 deletions lib/node_modules/@stdlib/streams/node/join/lib/defaults.js

This file was deleted.

7 changes: 7 additions & 0 deletions lib/node_modules/@stdlib/streams/node/join/lib/defaults.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"objectMode": false,
"encoding": null,
"allowHalfOpen": false,
"readableObjectMode": false,
"sep": "\n"
}
5 changes: 3 additions & 2 deletions lib/node_modules/@stdlib/streams/node/join/lib/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,8 @@
var setNonEnumerable = require( '@stdlib/utils/define-nonenumerable-property' );
var setNonEnumerableReadOnly = require( '@stdlib/utils/define-nonenumerable-read-only-property' );
var nextTick = require( '@stdlib/utils/next-tick' );
var defaults = require( './defaults.js' );
var assign = require( '@stdlib/object/assign' );
var DEFAULTS = require( './defaults.json' );
var validate = require( './validate.js' );
var debug = require( './debug.js' );

Expand Down Expand Up @@ -57,7 +58,7 @@
} else if ( this._init ) {
chunk = new Buffer( chunk, encoding );
len = this._sep.length + chunk.length;
chunk = Buffer.concat( [ this._sep, chunk ], len ); // TODO: replace with stdlib pkg

Check warning on line 61 in lib/node_modules/@stdlib/streams/node/join/lib/main.js

View workflow job for this annotation

GitHub Actions / Lint Changed Files

Unexpected 'todo' comment: 'TODO: replace with stdlib pkg'
chunk = chunk.toString( this._encoding );
} else {
this._init = true;
Expand All @@ -76,7 +77,7 @@
*/
function flush( clbk ) {
debug( 'Flushing the stream...' );
clbk(); // TODO: consider supporting an option to append a final separator

Check warning on line 80 in lib/node_modules/@stdlib/streams/node/join/lib/main.js

View workflow job for this annotation

GitHub Actions / Lint Changed Files

Unexpected 'todo' comment: 'TODO: consider supporting an option to...'
}

/**
Expand Down Expand Up @@ -163,7 +164,7 @@
}
return new JoinStream();
}
opts = defaults();
opts = assign( {}, DEFAULTS );
if ( arguments.length ) {
err = validate( opts, options );
if ( err ) {
Expand Down