pull-serializer
Serializes and parses pull-streams, eg for sending over a channel.
Takes a duplex pull-stream and returns a wrapped version which will emit/consume the serialized format. The second parameter optionally takes an object with {stringify: Function, parse: Function}
defined (the JSON
signature). The third parameter optionally takes flags {ignoreErrors: Boolean, separator: String}
.
ignoreErrors
: if true, bad JSON is filtered out and not emitted. If false (default) parse errors are emitted asError
objectsseparator
: sets the string to separate messages with (default '\n')
var serializer = var theduplex =