You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
17 lines
406 B
17 lines
406 B
'use strict'
|
|
|
|
const check = require('check-types')
|
|
const BfjStream = require('./stream')
|
|
const util = require('util')
|
|
|
|
util.inherits(JsonStream, BfjStream)
|
|
|
|
module.exports = JsonStream
|
|
|
|
function JsonStream (read, options) {
|
|
if (check.not.instanceStrict(this, JsonStream)) {
|
|
return new JsonStream(read, options)
|
|
}
|
|
|
|
return BfjStream.call(this, read, Object.assign({ encoding: 'utf8' }, options))
|
|
}
|
|
|