Files
FrenoCorp/node_modules/stream-json/streamers/StreamValues.js
Michael Freno 7c684a42cc FRE-600: Fix code review blockers
- Consolidated duplicate UndoManagers to single instance
- Fixed connection promise to only resolve on 'connected' status
- Fixed WebSocketProvider import (WebsocketProvider)
- Added proper doc.destroy() cleanup
- Renamed isPresenceInitialized property to avoid conflict

Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-04-25 00:08:01 -04:00

34 lines
784 B
JavaScript

'use strict';
const StreamBase = require('./StreamBase');
const withParser = require('../utils/withParser');
class StreamValues extends StreamBase {
static make(options) {
return new StreamValues(options);
}
static withParser(options) {
return withParser(StreamValues.make, Object.assign({}, options, {jsonStreaming: true}));
}
constructor(options) {
super(options);
this._counter = 0;
this._level = 0;
}
_push(discard) {
if (discard) {
++this._counter;
} else {
this.push({key: this._counter++, value: this._assembler.current});
}
this._assembler.current = this._assembler.key = null;
}
}
StreamValues.streamValues = StreamValues.make;
StreamValues.make.Constructor = StreamValues;
module.exports = StreamValues;