@progress/kendo-angular-inputs
Version:
Kendo UI for Angular Inputs Package - Everything you need to build professional form functionality (Checkbox, ColorGradient, ColorPalette, ColorPicker, FlatColorPicker, FormField, MaskedTextBox, NumericTextBox, RadioButton, RangeSlider, Slider, Switch, Te
42 lines (41 loc) • 1.17 kB
JavaScript
/**-----------------------------------------------------------------------------------------
* Copyright © 2024 Progress Software Corporation. All rights reserved.
* Licensed under commercial license. See LICENSE.md in the project root for more information
*-------------------------------------------------------------------------------------------*/
/**
* @hidden
*/
export class Stream {
constructor(input = [], control = []) {
this.input = input;
this.control = control;
this.inputCursor = 0;
this.controlCursor = 0;
}
eof() {
return this.inputCursor >= this.input.length;
}
// Get the first value from the input.
next() {
return {
char: this.input[this.inputCursor++],
control: this.control[this.controlCursor++]
};
}
peek() {
return {
char: this.input[this.inputCursor],
control: this.control[this.controlCursor]
};
}
eat_input() {
this.inputCursor++;
}
eat_control() {
this.controlCursor++;
}
eat() {
this.inputCursor++;
this.controlCursor++;
}
}